Checking if another application is open?

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
peter.s
Posts: 99
Joined: Thu Jul 10, 2008 11:47 am

Checking if another application is open?

Post by peter.s » Thu May 15, 2014 12:50 pm

Hi - I know how to launch and quit other applications, but how can you check if an other application is already open?

AndyP
Posts: 634
Joined: Wed Aug 27, 2008 12:57 pm
Contact:

Re: Checking if another application is open?

Post by AndyP » Thu May 15, 2014 3:45 pm

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.
Andy .... LC CLASSIC ROCKS!

peter.s
Posts: 99
Joined: Thu Jul 10, 2008 11:47 am

Re: Checking if another application is open?

Post by peter.s » Mon May 19, 2014 3:37 pm

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

Post Reply