• 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: Memory and idle applescript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Re: Memory and idle applescript (From: julifos <email@hidden>)

  • Prev by Date: Re: Strip characters without recursive loop
  • Next by Date: Re: Mixing Apple Script, Excel and a network
  • Previous by thread: Re: Memory and idle applescript
  • Next by thread: Re: Memory and idle applescript
  • Index(es):
    • Date
    • Thread