Re: Stay Open Script Applications & Events
Re: Stay Open Script Applications & Events
- Subject: Re: Stay Open Script Applications & Events
- From: Andrew Oliver <email@hidden>
- Date: Mon, 03 Feb 2003 18:51:50 -0800
I don't know about the Tao, but it is covered on page 162 of O'Reilly's
AppleScript in a Nutshell, the most current AppleScript 'bible', as far as
I'm concerned. :)
http://www.oreilly.com/catalog/aplscptian/
Admittedly, I couldn't find it anywhere else, including the Language guide,
but developer.apple.com is throwing as many 404's as real pages for me, so I
haven't looked that deeply.
Anyone at Apple want to fix the language guide?
Andrew
:)
On 2/3/03 5:16 PM, "Brett" <email@hidden> wrote:
>
>
That did it, thanks!
>
>
Is this documented somewhere? It sure doesn't seem to be in my Tao of
>
AppleScript <g>
>
>
>
A long time ago in a galaxy far, far away, it was reported that on 2/3/03
>
20:11, "Andrew Oliver" <email@hidden> wrote:
>
>
> Stay Open scripts need a 're-open' handler to handle subsequent 'opening' of
>
> the applications.
>
>
>
> If I recall, you need:
>
>
>
> on reopen
>
> display dialog "I'm already open!"
>
> end reopen
>
>
>
> Andrew
>
> :)
>
>
>
> On 2/3/03 4:01 PM, "Brett" <email@hidden> wrote:
>
>
>
>> I have the need for some script applications that will live in the Finder's
>
>> toolbar. The launch time for these scripts can actually be longer than the
>
>> run time so I wanted to be able to set the application to stay open and be
>
>> re-runnable by clicking it in the Finder's toolbar.
>
>>
>
>> The app runs great on first launch, but when I next access the application
>
>> (by again clicking the icon in the toolbar) the app comes to the front and
>
>> nothing happens. That should mean that the app is getting an activate event-
>
>> to test that, I put together the following script:
>
>>
>
>> --
>
>>
>
>> on open
>
>> display dialog "Open"
>
>> end open
>
>>
>
>> on run
>
>> display dialog "run"
>
>> end run
>
>>
>
>> on activate
>
>> display dialog "activate"
>
>> end activate
>
>>
>
>> --
>
>>
>
>> activate never gets called, but open works (if I drop something on the app)
>
>> and run works. Nothing seems to get called when the app is simply activated.
>
>>
>
>> Anyone know what (if any) usable event is sent to the app when it is
>
>> activated?
>
>>
>
>> -Brett
>
>> _______________________________________________
>
>> 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.
_______________________________________________
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.