Re: if, idle, stay open - PROVE IT
Re: if, idle, stay open - PROVE IT
- Subject: Re: if, idle, stay open - PROVE IT
- From: John W Baxter <email@hidden>
- Date: Sun, 7 Jan 2001 21:08:53 -0800
I ran the script below for just under 3 hours on Mac OS 9.0.4, with two IE
5 windows open...each of them arranged to refresh their pages periodically.
Specifically:
http://traffic.wsdot.wa.gov/hoodcanal/livefram.htm?
(each of two frames updates every 30 seconds)
http://www.wsdot.wa.gov/ferries/commuter_updates/vesselwatch/index.cfm/vesselwatch_ind/4
I went to the store leaving the Hood Canal Bridge window as the front
window in IE, and the applet in front.
Toward the end of the three hours, I messed about with which window was in
front. The applet continued to use processor time.
Then I ran another AppleScript script (application, run from a folder in
the Apple Menu Options folder) to open a Finder window I wanted to work on.
Almost immediately, Finder froze.
--John
At 23:30 -0700 1/6/01, Donald S. Hall wrote:
>
Try the following test script on OS 9.0.4. For me this crashes in about 15
>
minutes with IE5.0 running, faster, it seems, if IE has more than one window
>
open. Doesn't matter if it is saved as a classic applet or a Mac OS X applet:
>
>
property checkInterval : 30 -- check for new action times every this many
>
seconds
>
global today -- day of the week of today as a string
>
>
on run
>
beep 2
>
set today to word 1 of date string of (current date)
>
set theList to {{"test item", (current date) + 1 * days}}
>
end run
>
>
-- idle handler ---------------------------------------------------------
>
-- runs every checkInterval seconds
>
on idle
>
copy today to previousToday
>
--set today to word 1 of date string of (current date)
>
set today to (current date)
>
checkTheList() -- is it time to take action?
>
return checkInterval -- run this handler again after this many
>
seconds have
>
passed
>
end idle
>
>
-- check to see if an action time has passed -----------------------------
>
to checkTheList()
>
--do stuff
>
end checkTheList
>
>
On Friday, January 5, 2001, at 05:38 PM,
>
email@hidden wrote:
>
>
I REALLY need some empirical evidence of this, as ALL of my scripts
>
with idle handlers have if statements and I've had exactly 1 crash
>
that wasn't due to my own bad code.
>
>
(I add tasks to a list and then idle through that list in order
>
to allow the server to continue working while the script progresses)
>
>
My experience makes me want to decry this as a rumor, but it's so
>
persistently brought up I feel compelled to give it some credence...
>
>
Is there a test case script out there that succintly demonstrates this crash?
>
>
Is there a timeframe over which these suppossed crashes do not occur?
>
(As I'm not seeing it in the 2-12 hours runs I use...)
>
>
~Phi
>
_______________________________________________
>
applescript-users mailing list
>
email@hidden
>
http://www.lists.apple.com/mailman/listinfo/applescript-users
--
John Baxter email@hidden Port Ludlow, WA, USA