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

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


References: 
 >Re: Osascript: Portable Path to Icon (From: has <email@hidden>)

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