The default Commands.ini file comes pre-populated with some ControlPad internal commands
Note that this default Commands.ini file is only created if you have installed ControlPad using the supplied installer.
If you have not used the installer (i.e. extracted with WinRar compatible software), then you may add any of these commands manually.
9998 =~Reload 9999 =~Exit 905 =~ToggleSpeedPad 902 =~ShowCodeList 901 =~Options 900 =~OpenCommandFile 7 =~WinMinimize 8 =~WinMaximizeRestore 9 =~WinClose 5 =~WinMinimizeAll
List of Internal Commands
|~Options||Open ControlPad's Options dialog|
|~OpenCommandFile||Open the Commands.ini file|
|~ShowCodeList||Open the Code List dialog|
|~ToggleSpeedPad||Enable/Disable the SpeedPad feature|
|~WinMinimize||Minimize the active window|
|~WinMaximizeRestore||Maximize or restore the active window|
|~WinClose||Close the active window|
|~WinMinimizeAll||Minimize all windows (show desktop)|
|~FocusOrRun <WinTitle>|<Command>||Focus a window with WinTitle in the title. If the window is not found, run the command. The command is optional - if blank, will only focus the found window.|
Example: ~FocusOrRun FreeCommander|C:\Program Files\FreeCommander.exe
Program and Process Operations
|~Close <Window Name>||Close the window that contains the specified text in the title. If multiple windows match, only one of them will be closed. The text is case sensitive.|
Example: ~Close Notepad
|~Kill <Process Name>||Close the specified process.|
Example: ~Kill iexplore.exe
|~CloseAll <Window Name>||Same as ~Close, only will close all matching windows (up to 20).|
Example: ~CloseAll Notepad
|~KillAll <Process Name>||Same as ~Kill, only will close all matching processes (up to 20).|
Example: ~KillAll iexplore.exe
Window Event Operations
Note that all of these events will wait for up to 5 seconds for the event to occur. If you need to used a different interval, add a comma at the end of the command followed by the number of seconds you wish to wait - for example: ~WinWaitActive Notepad,10
Also keep in mind that while ControlPad is waiting, it cannot accept any other code.
|~WinWaitActive <Window Name>||Wait for the window that contains the specified text in the title to get focus.|
Example: ~WinWaitActive Outlook
|~WinWaitNotActive <Window Name>||Wait for the window that contains the specified text in the title to lose focus.|
Example: ~WinWaitNotActive Outlook
|~WinWaitExist <Window Name>||Wait for the window that contains the specified text in the title to open.|
Example: ~WinWaitExist Notepad
|~WinWaitClose <Window Name>||Wait for the window that contains the specified text in the title to close.|
Example: ~WinWaitClose Notepad
Note that while any of these commands is running, any other ControlPad operation is halted.
|~Sleep <Milliseconds>||Wait for the specified number of milliseconds before moving on. Useful in Combination Commands.|
Example: ~Sleep 1000
|~MsgBox <Message>||Shows a message box with the specified message. Use "`n" to add a new line.|
Example: ~MsgBox Completed.`nPress OK To continue.