【问题标题】:Applescript open URL and refresh every 5 seconds WITHOUT opening new tabApplescript 打开 URL 并每 5 秒刷新一次而不打开新标签
【发布时间】:2015-09-01 21:17:56
【问题描述】:

这是我目前所拥有的,但我的问题是每 5 秒后它会在新标签页中打开 url。

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

【问题讨论】:

    标签: google-chrome applescript refresh


    【解决方案1】:

    Chromium Suite 中有一个reload 命令。

    例子:

    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
    

    【讨论】:

      【解决方案2】:

      这对我有用...

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

      您也可以使用tell active tabtell front window

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2022-11-18
        • 2013-08-26
        • 2016-03-21
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2016-06-19
        • 1970-01-01
        相关资源
        最近更新 更多