Created
June 11, 2015 12:02
-
-
Save anonymous/556e70dc4ee537bb518f to your computer and use it in GitHub Desktop.
オートリロード(スレッド一覧)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 更新間隔(秒数で指定) | |
property interval : 300 | |
on run | |
set msg1 to "スレッド一覧のオートリロードを" & ((interval / 60) as integer) & "分間隔で開始してもよろしいですか?" | |
set msg2 to "何も操作をしないと、10秒後に自動的にオートリロードが開始されます。" | |
try | |
display alert msg1 message msg2 buttons {"キャンセル", "開始"} default button 2 cancel button 1 giving up after 10 | |
on error errMsg number errNum | |
if errNum = -128 then | |
-- AppleScript エディタで編集中の場合を除く | |
if (id of current application) is not "com.apple.ScriptEditor2" then | |
quit -- アプレットを終了 | |
end if | |
end if | |
end try | |
end run | |
on idle | |
tell application "BathyScaphe" | |
repeat with eachDoc in documents | |
if class of eachDoc is browser then reload list eachDoc | |
end repeat | |
end tell | |
return interval | |
end idle |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment