Re: Safari reload script.
Re: Safari reload script.
- Subject: Re: Safari reload script.
- From: Michelle Steiner <email@hidden>
- Date: Sun, 24 Oct 2004 15:53:20 -0700
On Oct 24, 2004, at 12:08 PM, Jordan Rickards wrote:
I would like the script to just ignore it self when there are no
windows and also when Safari is not open. I thought the on error
would do that but it does not seem so. It would also would be nice if
message box would come up and ask you to reload just incase the user
is in the middle of something. But if the user is not there it would
select the option to reload after like 10 seconds or so. I hope I'm
not asking to much.
tell application "System Events"
set safari_flag to (name of application processes contains "Safari")
end tell
if safari_flag then
tell application "Safari"
if (count (windows whose visible is true)) is greater than 0 then
set reload to (display dialog "GSX needs to reload so it won't
timeout." buttons ¬
{"Cancel", "Reload GSX"} default button 1 giving up after 10)
if (button returned of reload is "Reload GSX") or (gave up of
reload) then
--do your stuff
end if
end if
end tell
end if
--
"My country, right or wrong: if right, to be kept right; and if wrong,
to be set right."
Senator Carl Schurz of Missouri, 1899
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden