Created
May 27, 2013 15:57
-
-
Save g-r-a-v-e-l-y/5657778 to your computer and use it in GitHub Desktop.
A very silly "turn chrome into a full screen kiosk and tab-rotate it with applescript" waste of time.
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
## settings | |
set lag to 120 | |
set sites to {"http://nyan.cat", "http://grantstavely.com/files/borat.html"} | |
## functions | |
on tab_toggle(lag, sites) | |
set siteCount to count sites | |
tell application "System Events" | |
## lame hacks abound | |
keystroke "f" using {command down, shift down} | |
# tab to get hide the url bar again just in case | |
keystroke tab | |
keystroke tab | |
keystroke tab | |
repeat | |
set tabnumber to 1 | |
repeat siteCount times | |
delay lag | |
set tabjump to tabnumber as string | |
keystroke tabjump using {command down} | |
keystroke tab | |
keystroke tab | |
keystroke tab | |
set tabnumber to tabnumber + 1 | |
end repeat | |
end repeat | |
end tell | |
end tab_toggle | |
on load_sites(sites) | |
tell application "Google Chrome" | |
make new window | |
activate | |
repeat with site in sites | |
tell window 1 | |
set myTab to make new tab at end of tabs with properties {URL:site} | |
repeat while loading of active tab | |
delay 0.1 | |
end repeat | |
end tell | |
end repeat | |
delete tab 1 of window 1 | |
end tell | |
end load_sites | |
load_sites(sites) | |
tab_toggle(lag, sites) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment