InfoAppActive() Function
- Last UpdatedFeb 21, 2017
- 1 minute read
Returns the running status of an application.
Syntax
result = InfoAppActive (apptitle)
Parameters
apptitle
The application title or Windows task list of the application for which you want to query the running status. A literal string value, message tagname, or string expression.
Return Value
A Boolean value indicating:
0 - The application is not running
1 - The application is running
Example(s)
This script queries for the application Notepad, and if it is already running, activates it. Otherwise it launches a new instance of Notepad. This way launching Notepad multiple times is avoided.
IF InfoAppActive(InfoAppTitle("Notepad"))==1
THEN
ActivateApp InfoAppTitle( "Notepad" );
ELSE
StartApp "Notepad";
ENDIF;