• 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
Help with droplet
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Help with droplet


  • Subject: Help with droplet
  • From: Emmett Gray <email@hidden>
  • Date: Sat, 30 Apr 2005 11:07:54 -0400

I have a working droplet app which processes one or more dropped files or folders, and on launch shows a dialog, and then after the process terminates, shows another dialog offering to open the logfile(s) it wrote or just quit. I am trying to turn it into an AS Studio app so as to allow it to accept more stuff to process while it is already running; as a pure AS droplet, once launched it won't recognize another drop.

The ASS version is working sort of, but essentially shows the second drop in a second dialog box as if I had launched another copy of the application. This would be OK except that on termination, when I dismiss the first dialog, it is telling the app to quit and this causes a crash because the second process is still active (even if just showing its dialog). I do want the app to quit when it's done with everything and not stay open.

What I'd really like to do and can't conceptually figure out is how to simply append to the list of items to process rather than create a new list with the second drop, and how to skip the opening dialog for subsequent drops, and then how to terminate with a combined dialog for everything. Specifically what I don't get is how to construct a mechanism for the app to distinguish between "on open" for the first run and "on open" for additional drops, like using a property or a global or writing to a file or something. How would that get reset for a new launch and modified for additional drops? If I use a file, how would I clean up if there's a crash or interruption and the file doesn't get deleted?

If this is difficult or complicated, I'd be satisfied just to understand how to use the idle handler to determine whether or not there is still a process running and to tell the app to quit when there is not.

With either approach, I still see a potential problem in the situation when the app is showing its final dialog (perhaps in the background) and another drop happens at that point. Maybe the idle routine could handle that situation and treat it as a whole new launch.

Maybe I'm not thinking about this in the right way. Any help is appreciated, including a pointer to RTFM.

Best,

--Emmett

_______________________________________________
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


  • Prev by Date: Using AppleScript to Detect Nul Characters
  • Next by Date: Re: Using AppleScript to Detect Nul Characters
  • Previous by thread: Re: Using AppleScript to Detect Nul Characters
  • Next by thread: theText is empty. why?
  • Index(es):
    • Date
    • Thread