• 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: Safari reload script.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Safari reload script.


  • Subject: Re: Safari reload script.
  • From: Jordan Rickards <email@hidden>
  • Date: Mon, 25 Oct 2004 20:17:30 -0700

Thanks for your help this is working great. I had one question though do you know how to get ride of the time out error when a safari window is open but not the active program. It doesn't seem to do this when the program is hidden

Thanks,

Jordan

Jordan Rickards
Apple Certified Desktop Technician
Apple Certified Portable Technician
Apple Certified Help Desk Specialist
--------------------------------------------------
PowerMacPac
12310 N.E. Whitaker Way
Portland, OR. 97236
1-800-460-8080
503-256-5210
503-256-5434 (fax)
www.macpac.com

On Oct 24, 2004, at 3:53 PM, Michelle Steiner wrote:

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

References: 
 >Safari reload script. (From: Jordan Rickards <email@hidden>)
 >Re: Safari reload script. (From: Michelle Steiner <email@hidden>)

  • Prev by Date: Re: switching text delimiters (was: email@hidden)
  • Next by Date: Dice
  • Previous by thread: Re: Safari reload script.
  • Next by thread: Re: Safari reload script.
  • Index(es):
    • Date
    • Thread