Mac Guys, is it possible to auto-load specific URL every X minutes?

Goldfrapp

macrumors 601
Original poster
Jul 31, 2005
4,906
5,703
I've created an AppleScript. However, the problem is it loads the URL in a new tab every time. Any way to tell it to load in the same tab?

Or any other solution/app?

Your help would be greatly appreciated.

Thank you.
 

numero

macrumors regular
Jul 23, 2002
105
3
OR
AppleScript:
tell application "Safari"
    set theDocument to make new document at end of documents
    set theWindow to window 1
    tell theWindow
        repeat
            set properties of tab 1 to {URL:"http://www.apple.com"}
            delay 60
            set properties of tab 1 to {URL:"http://www.google.com"}
            delay 60
        end repeat
    end tell
end tell
This alternates between URLs just to prove that it works.

Delay value is in seconds. So this example does 1 minute between reloads.

The important part is to grab a reference to the newly created window once it is created. Now you can refer to it even if new windows are created on top of this one.

The repeat loop here will repeat forever.

-numero
 
  • Like
Reactions: cdcastillo