Re: Addressing an app that may or may not exists (without alerting user)
Re: Addressing an app that may or may not exists (without alerting user)
- Subject: Re: Addressing an app that may or may not exists (without alerting user)
- From: Takaaki Naganoya <email@hidden>
- Date: Thu, 02 Mar 2006 13:01:15 +0900
- Thread-topic: Addressing an app that may or may not exists (without alerting user)
I think that this is the best way.
<script>
getPresenseOfApp("com.Growl.GrowlHelperApp") of me
on getPresenseOfApp(idText)
tell application "Finder"
try
set a to application file id idText
return true
on error
return false
end try
end tell
end getPresenseOfApp
</script>
--
Takaaki Naganoya
Piyomaru Software
http://www.appleco.jp/piyomarusoft/
On 06.2.28 2:03 AM, "Sean P. Kane" <email@hidden> wrote:
> I have added support for Growl into my script and would like it simply
to be
> used if the user happens to have it installed. I have it in a
try block that
> does nothing on error. However the problem I have is
that it the system asks
> to locate the GrowlHelper application I am
addressing when it can't find it
> instead of simply failing silently.
Is there a way to write this so that it
> will not ever ask the user
where this application
> is?
Thanks,
Sean
--
--------------------------------------------------------
> ------------------------------------------------------------
Sean P. Kane
>
> email@hidden
-----------------------------------------------------------
> ----------------------------------------------------------
Congress
> appropriates. Microsoft lobbies.
Citizens
> steal.
> _______________________________________________
> 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
_______________________________________________
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