• 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: Craig Stanton <email@hidden>
  • Date: Thu, 12 Oct 2006 08:13:55 +1300

 That looks pretty similar to what I started with, though I had "set forceQuit to true" rather than your proprty variant. I'm at work now so I can't check if the change is enough to make a difference. The script is being built by XCode, so it counts as an Applescript Studio type app. Therefore if it stays open they have a menu option to quit, and see the about box, but there is nothing else for them to do there.

Cheers,
  Craig


On Thursday, October 12, 2006, at 07:58AM, kai <email@hidden> wrote:

>
>On 11 Oct 2006, at 18: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?
>
>Sure, Craig - although you'd also need to consider a way to let the
>user quit when required (short of a force-quit). The following
>method, which should obviously be saved as a stay-open app, uses a
>second double-click (reopen) to give the user that option:
>
>--------
>
>property really_quit : true
>
>on open some_list
>	(* do something with some_list *)
>	if really_quit then quit
>end open
>
>on reopen
>	display dialog "Quit this application?"
>	set really_quit to true
>	quit
>end reopen
>
>on run
>	set really_quit to false
>end run
>
>--------
>
>Another way would be to place the conditional statement in a quit
>handler:
>
>--------
>
>property really_quit : true
>
>on open some_list
>	(* do something with some_list *)
>	quit
>end open
>
>on reopen
>	display dialog "Quit this application?"
>	set really_quit to true
>	quit
>end reopen
>
>on quit
>	if really_quit then continue quit
>end quit
>
>on run
>	set really_quit to false
>end run
>
>--------
>
>---
>kai
>
>
> _______________________________________________
>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
>
>
 _______________________________________________
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>)
 >Re: App and droplet (From: kai <email@hidden>)

  • Prev by Date: Re: scripting BOMArchiveHelper possible ?
  • Next by Date: Re: UI scripting
  • Previous by thread: Re: App and droplet
  • Next by thread: Re: App and droplet
  • Index(es):
    • Date
    • Thread