Re: How do I test if app is running / file is open?
Re: How do I test if app is running / file is open?
- Subject: Re: How do I test if app is running / file is open?
- From: Andrew Oliver <email@hidden>
- Date: Thu, 22 Dec 2005 09:55:39 -0800
On 12/22/05 4:39 AM, "Jim Hankins" <email@hidden> wrote:
> Greetings:
>
> I'm trying to setup Filemaker Pro 8 with a keep alive in cron so if it's
> closed or crashes, it will startup again automatically. As it is a shared
> database, I want to see if I can also test to see that the file is open as
> well.
Ask System Events:
tell application "System Events"
if application process "Filemaker Pro" exists then
-- do your stuff
else
-- or not, as appropriate
end if
end tell
Note that there are specific issues in using cron with AppleScript.
Specifically it won't work if it's added to a user's crontab when that user
is logged in. Additionally if you add it to the root crontab it will fire
off, even when you don't want Filemaker to run (if there's ever a case).
You might be better off saving this as a script application that's launched
by the user's login items. That way it'll only be active when the Filemaker
user is logged in (which is the only time FileMaker Pro is going to run
anyway.
Andrew
:)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden