Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Reload all open tabs in Safari 3 via AppleScript Apps
With the release of the Safari 3 beta, Apple has finally decided to upgrade the AppleScript-ability of the program. The biggest change I can see is the ability to directly manipulate tabs.

As an example of this functionality, I wrote a script that will reload all open tabs at a predetermined interval. Obviously, this script will only run on Safari 3.

[robg adds: In case the source linked above ever vanishes, here's the code as it existed when this story was posted:

(*
Written by:   Sean Long
On:      06/11/2007
From:     http://www.hailstonesoftware.com
Purpose:  Auto reload tabs in Safari. Currently will reload every 2 minutes.    
License:  free to use how you choose.
*)

global seconds_to_delay
set seconds_to_delay to 120

tell application "Safari"
  repeat
    repeat with i from 1 to the count of windows
      set this_win to (window i)
      repeat with j from 1 to the count of every «class bTab» in this_win
        do JavaScript "window.location.reload()" in («class bTab» j of window i)
      end repeat
    end repeat
    delay seconds_to_delay
  end repeat
end tell

This worked as described when I tested it.]
    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
 
[12,794 views]  

Reload all open tabs in Safari 3 via AppleScript | 0 comments | Create New Account
Click here to return to the 'Reload all open tabs in Safari 3 via AppleScript' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.