• 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: "on run" & "on re-run"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "on run" & "on re-run"


  • Subject: Re: "on run" & "on re-run"
  • From: JJ <email@hidden>
  • Date: Sat, 16 Feb 2002 00:37:50 +0100

> Reopen was my first thought, but I changed my response after noting
> that it was responding to double-clicking by functioning properly. I was
> thinking that this should pass a reopen event to a running stay-open app.
>
> So this makes me wonder, is there a REOPEN event or is the RUN
> event re-routed to the REOPEN handler when the app is already running?
> Since JJ's app responded to a second icon double click I assume that
> there are both, but I'd like to know for sure. And of course this begs
> the question...Does the finder first test the state of the app before
> generating an event? And if so, why does the icon double-click
> consistently send RUN?
> When I select a running stay-open app in the Dock (OS10.1.2/AS
> 1.8.1) the app runs it's REOPEN handler; is this correct behavior? I
> expected an ACTIVATE.

Effectively, double-clicking a running stay-open app is handled by "reopen".

> OK I know...'Off to the ASLG with you!' trudge, trudge, trudge...
>
> On Friday, February 15, 2002, at 01:50 PM, Paul Berkowitz wrote:
>
>> No, I think he's looking for:
>>
>> on reopen
>>
>> end reopen

OK. Actually, I'm running this test stay-open droplet under OS 9.
_____________
on run
display dialog "run"
end run

on open
display dialog "open"
end open

on reopen
display dialog "reopen"
end reopen

on activate
display dialog "activate"
end activate

on launch
display dialog "launch"
end launch
____________
I don't wish communicate myself with the droplet (sending it commands "tell
app My_Droplet to open"), but through "apple menu" or some app able to
"open" alias, such as Entourage.

AND

Running from Apple menu, I receive, at first, "run".
So, now the droplet is up and running.
Second time: the droplet activates but nothing happens.

That's because I need a "on re-run" handler.

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

  • Follow-Ups:
    • Re: "on run" & "on re-run"
      • From: Paul Berkowitz <email@hidden>
  • Prev by Date: Re: display dialog and screen saver bug?
  • Next by Date: Re: 1.82b download?
  • Previous by thread: Re: "on run" & "on re-run"
  • Next by thread: Re: "on run" & "on re-run"
  • Index(es):
    • Date
    • Thread