Re: timing
Re: timing
- Subject: Re: timing
- From: Paul Berkowitz <email@hidden>
- Date: Mon, 08 Jul 2002 10:14:47 -0700
On 7/8/02 8:04 AM, "Antonio Inojal" <email@hidden> wrote:
>
Hello, I am making a script to work on a network of OSX boxes. The
>
script is pretty basic, if anything is dropped into a folder, as someone
>
on my network would do, the name of the folder changes to say: "You have
>
so and so messages". The thing is that OSX does NOT have folder actions
>
and I thought of just making a loop that runs until I quit the script.
>
Well, when I went to ProcessViewer to check the cpu % the script was
>
taking, it was very big. Actually it was always over 50% and sometimes
>
60%. I have a G3 266 computer and I am not going to stop all of my
>
processes just so a very simple script can run. Well, I thought that
>
maybe if I told the script to check the folder every so and so, say 1
>
minute, and display the results , it would be much better because I
>
could still keep my CPU for other things in that minute. So far I have
>
not found such a thing on AppleScript. If anyone knows of a way to make
>
a script idle for a certain amount of time, please tell me. I appreciate
>
your time very much. Thank You.
You even have the right name. Save your script as a stay-open application
and include an idle handler:
on idle
--do its stuff
return 60 -- i.e. seconds
end idle
-----------
'idle handlers' are basic to AppleScript and always have been. You could
have found out about them in the AppleScript Language Guide, available free
in .pdf format from the AppleScript website at apple.com. It has an
excellent index.
--
Paul Berkowitz
_______________________________________________
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: | |
| >timing (From: Antonio Inojal <email@hidden>) |