Back

Command NameWindow
Parameter A name of your choice

Commands Minimize, Maximize, Restore, Activate, Close, PutOnTop, PutOffTop
Parameter A name you have given to a window or Spartan or Original. (Original is the name automatically allocated to the Window which was active immediately prior to the script being run.

Examples....

NameWindow "Notepad"
NameWindow "Fax Folder"
PutOnTop "NotePad"
Minimize "Fax Folder"

Notes:
The NameWindow command associates the active window with the name you give.

Once you have given a window a name, you can manipulate it with the commands Minimize, Maximize, Restore, SetFocus, Activate, Close, PutOnTop and PutOffTop.

Example This allows you to switch between Notepad full screen, Excel full screen and Excel with Notepad on top.

[[Script]]
Open "%windir%\system32\notepad.exe"
NameWindow "Notepad"
Open "C:\Program Files\Microsoft Office\OFFICE11\EXCEL.EXE"
NameWindow "Excel"
Minimise "Notepad"
Minimize "Excel"
Loop
   Menu3 "NotePad Full Screen;Excel Full Screen;Notepad on top of Excel;Close both and end script"
   If Button = 1
      Maximize "Notepad"
      Minimize "Excel"
      PutOffTop "Notepad"
   EndIf
   If Button = 2
      Maximize "Excel"
      Minimize "Notepad"
   EndIf
   If Button = 3
      Maximize "Excel"
      Restore "Notepad"
      PutOnTop "Notepad"
   EndIf
   If Button = 4
      ExitLoop
   EndIf
EndLoop
Restore "Notepad"
Close "Notepad"
Restore "Excel"
Close "Excel"


Back