Osascript: Portable Path to Icon
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