Page 1 of 1

Checking if another application is open?

Posted: Thu May 15, 2014 12:50 pm
by peter.s
Hi - I know how to launch and quit other applications, but how can you check if an other application is already open?

Re: Checking if another application is open?

Posted: Thu May 15, 2014 3:45 pm
by AndyP
On Windows try this example,
checking for notepad.exe running



on mouseUp
put empty into fld "myTaskList"
put shell ("TaskList") into fld "myTaskList"
if "notepad.exe" is among the tokens of fld "myTaskList" then
answer "Notepad is Running"
end if
end mouseUp

it's normally the case that you would use 'among the words' instead of 'among the tokens' but I've found that 'tokens' tends to be more reliable when a punctuation is within the pattern match.

Re: Checking if another application is open?

Posted: Mon May 19, 2014 3:37 pm
by peter.s
Thanks Andy - I'm actually on a Mac, but I see what your suggesting and so I'll try something along these lines.

Cheers - P