Window
Overview
- The Window commands allow manipulation of the windows of running programs.
Actions
-
AutoMin
- Minimises all windows matching the specified caption list in one of 2 ways depending on whether each individual window is listed in the "Auto tray min" list on the PowerPro Config GUI > Setup tab or not, either minimising the window to the tray, or performing an ordinary minimise.
-
Back
- Sends all windows matching the specified caption list to the bottom of the stack of displayed windows.
-
BackShow
- Toggles backmost/foremost setting of each window matching the specified caption list, sending it to the back if foremost, else activating it.
-
Center
- Centres the specified window(s) within the full screen area.
-
Close
- Closes the specified window(s).
-
Close2
- Closes the specified window(s) using a different technique than Window.Close().
-
CloseForce
- Forces the specified window(s) to close, possibly losing any unsaved information.
-
Hide
- Makes a window invisible.
-
HideShow
- Toggles a window's visibility.
-
Max
- Maximises the specified window(s).
-
MaxNormal
- Toggles the maximised state of the specified window(s).
-
Min
- Minimises the specified window(s).
-
MinMemory
- Sets the memory working set for the specified window(s).
- Windows NT only.
-
MinRestore
- Toggles the minimised state of each window matching the specified caption list.
-
Move
- Sets the specified window(s) to move with the mouse until any mouse button is pressed.
-
Normal
- Restores all windows matching the specified caption list to "Normal" size (not minimised or maximised).
-
NotTop
- Removes any "Always On Top" settings for all windows matching the specified caption list.
-
OnTop
- Sets all windows matching the specified caption list to be "Always on top".
-
PostMessage
- Sends a WinAPI PostMessage() call to each window matching the specified caption list.
-
Position
-
-
Rollup
- Toggles a window's "rolled-up" state, rolling it up to just its caption if it is fully visible, or showing it again if it is already rolled-up.
-
SendMessage
- Sends a WinAPI SendMessage() call to each window matching the specified caption list.
-
SetPriority
- Sets process priority of specified window.
-
Show
- Activates the specified window & shows it if hidden.
-
Size
- Enables the user to size the window by moving the mouse; click any mouse button to stop.
-
TopNotTop
- Toggles the "Always on top" setting for each window matching the specified caption list.
-
Trans
- Makes all windows matching the specified caption list transparent.
- Windows 2000 and XP only.
-
TransMouse
- Makes all windows matching the specified caption list transparent, as well as making all mouse clicks pass through them.
- Windows 2000 and XP only.
-
TrayMin
- Minimizes all windows matching a caption list to the system tray.
Specifying the Window Id
- The window identifier (wid parameter) can be:
- Any standard caption list item
- See:
- PPSR > Language Reference > Caption Lists
- PPSR > Language Reference > Window Id's
- Extra wid keywords for Window.[Action]() commands
- *
- The active window.
- all
- All windows.
- hidden
- Hidden windows.
- menu
- Displays a menu of active windows allowing user to select one to receive the command.
- Put "noembed" (must be lowercase) after keyword to..?
- menu hidden
- Similar to "menu", except the list includes active, hidden, & tray-minimised windows.
- menu onlyhidden
- Similar to "menu", except the list only includes hidden windows.
- menu trayminned
- Similar to "menu", except the list includes active & tray-minimised windows. (No hidden windows, though.)
- menux
- Similar to menu, except that if only one window matches the specified captionlist, then command is executed on that window without showing the menu.
Avoiding Errors
- Put an underscore _ after the action name to avoid an error message if the window does not exist.
- E.g.
- Window.Close_("*notepad*)
- Closes any open notepad windows, but does nothing if there are none open.
-
Notes
- Underscore only works with the Window built-in command.
- Underscore only works with expression syntax -- for Literal Syntax, use an exclamation mark (!) instead.