Appearance
IsApplicationRunning
The IsApplicationRunning function performs a background check on whether or not a specified program aAppName is currently running.
The function returns a boolean response of True if the program is running, and False if it is not.
Cleverly, it will detect if the program it is being called from is running.
Declaration: 'Function IsApplicationRunning(aAppName : string) : boolean
A simple example follows.
pascal
procedure ScriptEvent (var Value : variant);
var
ConfYN : boolean;
begin
LogInfo('');
//Checking to see whether Statelake MANAGER is currently running
ConfYN := IsApplicationRunning('manager.exe');
If ConfYN = true then
LogInfo('Yes it is running.')
else
LogInfo('Nope, it is not!!');
LogInfo('');
//Checking to see whether Statelake DESIGNER is currently running
//Of course it will be!
ConfYN := IsApplicationRunning('designer.exe');
If ConfYN = true then
LogInfo('Yes it is running')
else
LogInfo('Nope!!');
LogInfo('');
end;
