Action |
Sets the input focus to the application specified. This function is very useful in combination with the SendKeys function.
Syntax |
SETFOCUS ("Title")
Parameters |
Title
String specifying the title in the title bar of the application window you want to activate. In determining which application to activate, title is compared to the title string of each running application. If there is no exact match, any application whose title string begins with title is activated. If there is more than one instance of the application named by title, one instance is arbitrarily activated.
Returns |
0 |
Focus set to specified application. |
Error code |
Function failed |
Example |
If SetFocus
("Untitled - Notepad") = 0
?
"Focus set to Notepad...."
Endif