Skip to content

Instantly share code, notes, and snippets.

@nfelger
Created November 1, 2013 08:11
Show Gist options
  • Save nfelger/7262278 to your computer and use it in GitHub Desktop.
Save nfelger/7262278 to your computer and use it in GitHub Desktop.
Using AppleScript and launchd to open a bunch of URLs every morning when I get into work. (Why not just a shell script in cron? If your Mac is asleep when the run is scheduled, launchd will run it when you next wake it from sleep.)
set urls to {"http://somedashboard.interwebz"}
set urls to urls & {"https://github.com/org/project1/compare/master@%7B36.hours.ago%7D...master"}
set urls to urls & {"https://github.com/org/project2/compare/master@%7B36.hours.ago%7D...master"}
tell application "Google Chrome"
make new window
tell first window
set the first tab's URL to item 1 of urls
repeat with counter from 2 to length of urls
make new tab with properties {URL:item counter of urls}
end repeat
set the active tab index to 1
end tell
end tell
@andrebu
Copy link

andrebu commented Aug 7, 2016

Sweet, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment