• 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: Problem with Button/AppleScript/Shell Script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with Button/AppleScript/Shell Script


  • Subject: Re: Problem with Button/AppleScript/Shell Script
  • From: Chris Espinosa <email@hidden>
  • Date: Fri, 4 Jun 2004 08:27:00 -0700

On Jun 4, 2004, at 3:51 AM, Robert Whittle wrote:

I've got what must be a rather trivial problem, but I can't seem to solve it.

I have a simple interface (window with a Button) which has an Action (clicked) linked to an AppleScript which in turn calls a "do shell script"

When I run the Application (window with a single button on it) and click on the button, the script runs (i.e. it works correctly, but the button remains in the pressed position, and with the spinning rainbow spinning... I then have to force-quit the application.

Here's the AppleScript


on clicked theObject do shell script "/Applications/resin-ee-2.1.8/bin/start.sh &" end clicked

This is a FAQ in the use of 'do shell script' and is addressed in Tech Note 2065 (http://developer.apple.com/technotes/tn2002/tn2065.html)


Simply put, backgrounding a shell script command will cause AppleScript to wait until the processes' outputs (Standard Out and Standard Error) are closed. To make the script continue immediately, you must redirect the standard error and standard out to /dev/null.

Chris
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.


References: 
 >Problem with Button/AppleScript/Shell Script (From: Robert Whittle <email@hidden>)

  • Prev by Date: Framework size limits
  • Next by Date: [ANN] TestKit 0.9.4
  • Previous by thread: Problem with Button/AppleScript/Shell Script
  • Next by thread: Framework size limits
  • Index(es):
    • Date
    • Thread