Re: Osascript: Portable Path to Icon
Re: Osascript: Portable Path to Icon
- Subject: Re: Osascript: Portable Path to Icon
- From: Oakman <email@hidden>
- Date: Tue, 12 May 2015 22:09:22 -0400
On May 12, 2015, at 5:26PM, has wrote:
> You are using `osascript` to execute an actual AppleScript file, not just passing lines of AS code directly via `-e` options, yes?
has,
I appreciate your help.
Actually, FWIW and for the curious, I'm using Wineskin[1] to adapt a PC app to the Mac. It has built-in mechanisms to attach shell scripts to a menubar command. When a user selects one of the menubar commands it fires that script. The scripts are in bash with some bash code (variables and examples) ready to use. My script uses some of that bash code to achieve certain parts.
The script is similar to this:
----------
#!bin/bash
## some bash code
osascript -e 'set iconPath to ((path to applications folder as text) & "foo.app:Contents:Resources:OsascriptDir:IconsDir:foo.icns")' -e 'tell application id "com.apple.systemuiserver"' -e 'display dialog "Hello World" buttons {"Cancel", "Continue"} default button 2 with icon iconPath as alias ' -e 'end tell'
## more bash stuff
-----------
Thanks,
-Oakman-
[1] http://wineskin.urgesoftware.com/
_______________________________________________
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