Re: RAM and CPU hogging
Re: RAM and CPU hogging
- Subject: Re: RAM and CPU hogging
- From: "Stockly, Ed" <email@hidden>
- Date: Fri, 28 Sep 2007 13:13:08 -0700
- Thread-topic: RAM and CPU hogging
I'm picking up on a thread from back in July. You may remember that Timmothy
Hellum was using Safari to constantly display web pages on large monitors.
Our IT people started doing the same thing and were having no luck keeping
Safari running.
I've put together this script (below), based on Timothy's and it seems to
work, but after only a few cycles an error message displays indicating
"Safari has unexpectedly Quit" Giving me the option of closing, reporting to
apple or reopen.
Funny thing is, the Script running fine in the background and has reopened
Safari, behind the error message.
So, my questions are, is it possible to avoid the unexpected quits and is it
possible to clear the error dialog using GUI scripting, system events or any
other method?
Thanks.
Ed
property x : 1
property runcount : 1
property webPageList : {"http://www.calendarlive.com/tv",
"http://www.calendarlive.com/movies", "http://www.calendarlive.com/dining",
"http://www.calendarlive.com/music", "http://www.calendarlive.com/",
"http://www.calendarlive.com/galleriesandmuseums/",
"http://www.calendarlive.com/tv"}
on idle
try
tell application "Safari" to activate
tell application "Safari" to set URL of front document to item x of
webPageList
tell application "Safari" to set the bounds of window 1 to {0, 20,
1320, 970}
return 20
on error
tell application "Safari" to quit
delay 1
end try
if x < the (count of webPageList) then
set x to x + 1
else
set x to 1
end if
set runcount to runcount + 1
if runcount > 120 then
set runcount to 0
error
end if
end idle
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden