Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: App and droplet
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: App and droplet



On 11/10/06 19:33, Craig Stanton wrote:

[...] Is there a good way to make a script quit when it was started with drag-and-drop, but stay open if it was started by double clicking?


If you allow, my 2 cents:

   property RanRun : false

   on run
       set RanRun to true
   end run

   on open DraggedItems
       -- do something with DraggedItems
       if not RanRun then tell me to quit
   end open

   -- For an applet: make sure RanRun is reset.
   -- Should not be needed in AS Studio.
   on quit
       set RanRun to false
       continue quit
   end quit

Seems to work here, as a stay-open applet.

HTH,
Axel

_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >App and droplet (From: Craig Stanton <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.