Click here to return to the KiXtart HelpDesk main page...

KiXtart 2001 Manual

SetFocus( )

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.

0 Focus set to specified application
Error code Function failed  
See Also: SendKeys( )

If SetFocus ("Untitled - Notepad") = 0
  ? "Focus set to Notepad...."