To find out if a specific Windows application is running, use the following InTouch function. This may be useful when interacting with other third-party applications to check if they are active or not.
DiscreteValue = InfoAppActive(WinAppName);
WinAppName: The windows application name. This can be a literal string value, message tag, or locally declared script message variable.
DiscreteValue: If the application is running the returned result will be 1, if not the result will be 0.
Examples:
{Microsoft Notepad}
InfoAppActive(“Document Name - Notepad”);
{Microsoft Excel}
InfoAppActive(“Microsoft Excel – Spreadsheet Name”);
{Usage in a conditional statement}
IF InfoAppActive(“Microsoft Excel – Application Name”) == 0 THEN
{Start Microsoft Excel}
StartApp “C:\Program Files\Microsoft Office\Office12\Excel.exe C:\SpreadsheetLocation\Spreadheet.XLS”;
ENDIF;