Re: Memory and idle applescript
Re: Memory and idle applescript
- Subject: Re: Memory and idle applescript
- From: Paul Berkowitz <email@hidden>
- Date: Tue, 19 Aug 2003 08:20:15 -0700
Have you tried 'on reopen'? That's what gets a stay-open applet to respond
to double-clicking when it's already open. And it's quite easy to put all
your "real" code in another handler (or directed by this controller handler
to yet other handlers) and thus do the same thing as when first run:
on run
--any preparatory stuff to be done only when launched here
my ControllerHandler()
end run
on reopen
my ControllerHandler()
end reopen
on ControllerHandler()
-- stuff to do every time app is double-clicked
end ControllerHandler
--
Paul Berkowitz
>
From: julifos <email@hidden>
>
Date: Tue, 19 Aug 2003 14:36:30 +0200
>
To: <email@hidden>
>
Cc: applescriptmaillist <email@hidden>
>
Subject: Re: Memory and idle applescript
>
>
Maybe I defined vaguelly my purposes. Sorry ;-)
>
>
I don't want sleep. My purpose is a stay-open app which will react only to
>
the "open" event, but there is not idle handler.
>
>
jj
>
>
> my understanding is that
>
>
>
> do shell script "sleep 20"
>
> (or whatever)
>
>
>
> is efficient
>
>
>
> douglas in Pittsburgh
>
>
>
> On Tuesday, August 19, 2003, at 08:03 AM, julifos wrote:
>
>
>
>> Hi!
>
>>
>
>> I'm trying to create an app whose main goal is *wait* for user
>
>> requests, and
>
>> I've seen in the process-viewer that both applescript-studio apps and
>
>> applets are very memory-wasters in idle status, after PB, the Window
>
>> Manager
>
>> and the active app, which is waste-lots-of-memory for a simple idle
>
>> status...
>
>>
>
>> Do you know a workaround for this, to waste, eg 1% memory while
>
>> waiting,
>
>> instead a 8-10%?
>
>>
>
>> Cheers!
>
>>
>
>> 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.
>
_______________________________________________
>
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.