• 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: App and droplet
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: App and droplet


  • Subject: Re: App and droplet
  • From: Axel Luttgens <email@hidden>
  • Date: Thu, 12 Oct 2006 15:20:24 +0200

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


  • Follow-Ups:
    • Re: App and droplet
      • From: Philip Aker <email@hidden>
References: 
 >App and droplet (From: Craig Stanton <email@hidden>)

  • Prev by Date: Re: UI scripting
  • Next by Date: Re: Human Readable Time snipit
  • Previous by thread: Re: App and droplet
  • Next by thread: Re: App and droplet
  • Index(es):
    • Date
    • Thread