• 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
Osascript: Portable Path to Icon
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Osascript: Portable Path to Icon


  • Subject: Osascript: Portable Path to Icon
  • From: Oakman <email@hidden>
  • Date: Tue, 12 May 2015 12:59:09 -0400

Hello List,

I have an osascript that displays a dialog using:
set iconPath to ((path to applications folder as text) & "foo.app:Contents:Resources:OsascriptDir:IconsDir:foo.icns")
tell application id "com.apple.systemuiserver"
display dialog " Hello World" buttons {"Cancel", "Okay"}  with icon iconPath as alias
end tell

The osascript will reside in the "OsascriptDir" folder. How can I code the icon path so it is portable so no matter where the end user puts the app it will always show the icon in the dialog? Apparently 'path to me' does not work in osascripts.

FWIW the app is WINE based.

Thanks,
-Oakman-
 _______________________________________________
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


  • Prev by Date: Scripting VLC?'
  • Next by Date: Re: Osascript: Portable Path to Icon
  • Previous by thread: Scripting VLC?'
  • Next by thread: Re: Osascript: Portable Path to Icon
  • Index(es):
    • Date
    • Thread