fatalError
fatalError

Reputation: 345

Applescript open URL and refresh every 5 seconds WITHOUT opening new tab

This is what I have so far but my problem is it opens the url in a new tab after every 5 seconds.

repeat
    delay 5
    tell application "Google Chrome"
        open location "https://www.google.com"
    end tell
end repeat

Upvotes: 0

Views: 2339

Answers (2)

user309603
user309603

Reputation: 1538

There is a reload command in the Chromium Suite.

Example:

tell application "Google Chrome"
    activate
    open location "https://www.google.com"
    repeat
        delay 5
        tell tab 1 of window 1 to reload
    end repeat
end tell

Upvotes: 4

Dude named Ben
Dude named Ben

Reputation: 547

This works for me...

tell application "Google Chrome"
    tell window 1
        tell tab 1
            set URL to "https://google.com/"
        end tell
    end tell
end tell

You can also use tell active tab and tell front window.

Upvotes: 1

Related Questions