• 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: Tell Me to Quit in Unix-ese...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tell Me to Quit in Unix-ese...


  • Subject: Re: Tell Me to Quit in Unix-ese...
  • From: Yvan KOENIG <email@hidden>
  • Date: Tue, 07 Apr 2015 11:16:18 +0200


Le 06/04/2015 à 23:28, Stan Cleveland <email@hidden> a écrit :

On Apr 6, 2015, at 1:46 PM, Oakman <email@hidden> wrote:

I have a bash script I'm working on where I have a osascript dialog presented to the user via System Events. I want to give the user the opportunity to cancel out of the script, however I know not how to achieve that. Pressing the Cancel button does nothing and I don't know how to pass that 'Cancel' to the bash part of the script. I have googled for three days now w/o any luck. Most links go straight to 'do shell script' and I can't use an applescript as such in this project.

Hi Oakman,

in place of this:
'<kill script>'
Put this:
'error number -128'

You can safely eliminate the following unnecessary code, as well:
cancel button "Cancel"
The "Cancel" button is by definition the default cancel button. You'd specify this only if using a different button name, like this:
cancel button "Stop"

It's true if the system is running in English, not in other cases.
So, if you write a script in which every messages are in English, it's a good idea to define explicitly the Cancel button spelling.

Displaying a button spelled "Annuler" when every other words in the dialog are in English is awful.

Yvan KOENIG (VALLAURIS, France) mardi 7 avril 2015 11:16:13



 _______________________________________________
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

  • Follow-Ups:
    • Re: Tell Me to Quit in Unix-ese...
      • From: Oakman <email@hidden>
References: 
 >Tell Me to Quit in Unix-ese... (From: Oakman <email@hidden>)
 >Re: Tell Me to Quit in Unix-ese... (From: Stan Cleveland <email@hidden>)

  • Prev by Date: Re: Different behavior with shell scripts with AppleScript versus terminal
  • Next by Date: scripting Xcode to import images
  • Previous by thread: Re: Tell Me to Quit in Unix-ese...
  • Next by thread: Re: Tell Me to Quit in Unix-ese...
  • Index(es):
    • Date
    • Thread