Sign In
presys | scadadev.com
Bookmark and Share
Hardware | HMI/SCADA | MES | Database | Device Integration | Reporting






SCADA: Checking if a Windows Application is open using InTouch


Share |

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;

blog comments powered by Disqus

Home | Terms of Use | Privacy Policy | Contact Us
Copyright © 2010 scadadev.com. All Rights Reserved.