• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Check if app exists
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Check if app exists


  • Subject: Re: Check if app exists
  • From: deivy petrescu <email@hidden>
  • Date: Thu, 20 Sep 2007 23:24:44 -0400


On Sep 20, 2007, at 20:48, Jeremy Matthews wrote:

Hmmm...I tried a variety of suggestions and combinations, and many work well in Script Editor, but not AppleScript Studio (which the code was just moved to). I'd prefer to avoid cross-posting (especially if its not necessary), but has anyone else run into this?

Right now, the temporary script (which works) is like this:
<snip>
However, when I ADD the growl example code (link to sample code noted in the script above), it still prompts the user to find the application.


Ideas? Thanks, j

I changed your code a bit, but nothing serious and it works here. This is what I am using:

<script>
on growlcheck()
	try
		do shell script "ls /Library/PreferencePanes/Growl.prefPane/"
		return true
	on error
		return false
	end try
end growlcheck

on runapp()
if growlcheck() then
display dialog "growl installed" giving up after 2
tell application "GrowlHelperApp"
-- Make a list of all the notification types
-- that this script will ever send:
set the allNotificationsList to ¬
{"Test Notification", "Another Test Notification"}

-- Make a list of the notifications
-- that will be enabled by default.
-- Those not enabled by default can be enabled later
-- in the 'Applications' tab of the growl prefpane.
set the enabledNotificationsList to ¬
{"Test Notification"}

-- Register our script with growl.
-- You can optionally (as here) set a default icon
-- for this script's notifications.
register as application ¬
"Growl AppleScript Sample" all notifications allNotificationsList ¬
default notifications enabledNotificationsList ¬
icon of application "Script Editor"

-- Send a Notification...
notify with name ¬
"Test Notification" title ¬
"Test Notification" description ¬
"This is a test AppleScript notification." application name "Growl AppleScript Sample"

notify with name ¬
"Another Test Notification" title ¬
"Another Test Notification :) " description ¬
"Alas — you won't see me until you enable me..." application name "Growl AppleScript Sample"

end tell
else
display dialog "growl not installed"
end if
end runapp


runapp()
</script>

If you have a 'tell application "GrowlHelperApp"' it will not prompt you to find the app.


Deivy _______________________________________________ Do not post admin requests to the list. They will be ignored. AppleScript-Users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
References: 
 >Re: Check if app exists (From: Jeremy Matthews <email@hidden>)

  • Prev by Date: Re: Check if app exists
  • Next by Date: Re: Check if app exists
  • Previous by thread: Re: Check if app exists
  • Next by thread: Re: Check if app exists
  • Index(es):
    • Date
    • Thread