• 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: 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


  • Follow-Ups:
    • Re: Safari reload script.
      • From: Jordan Rickards <email@hidden>
References: 
 >Safari reload script. (From: Jordan Rickards <email@hidden>)

  • Prev by Date: Safari reload script.
  • Next by Date: Re: How do you make AppleScript App Behave as App
  • Previous by thread: Safari reload script.
  • Next by thread: Re: Safari reload script.
  • Index(es):
    • Date
    • Thread