Send Event Script Step to check if application open

Discussion created by DavidTinoco on Jan 25, 2016
Latest reply on Jan 26, 2016 by DavidTinoco

I am trying to create a script which checks if Windows Calculator is open. If it is, it brings it to the foreground. If it isn't it opens it.


Would someone be willing to provide the VBScript to do this?


I found:


MSHTA vbscript:Close(Execute("CreateObject(""WScript.Shell"").AppActivate(""Calculator"")"))


Used in a send event script step which works to bring it to the foreground.


I just don't know how to do the If/Else in VBScript to actually open it.