Last active
October 6, 2015 07:58
-
-
Save cbuck/2962202 to your computer and use it in GitHub Desktop.
Alfred snippets
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
tell front window of application "Safari" | |
make new tab with properties {URL:"http://poseidon"} | |
end tell | |
tell application "Google Chrome" | |
try | |
if (count of (every window where visible is true)) is greater than 0 then | |
tell front window | |
make new tab | |
end tell | |
else | |
make new window | |
end if | |
set URL of active tab of front window to "http://poseidon/tickets/list/open_tickets?sort=updated_at&sort_dir=desc" | |
activate | |
end try | |
end tell | |
on alfred_script(q) | |
tell application "Safari" | |
if not (exists (document 1)) then | |
make new document with properties {URL:"http://poseidon/tickets/list/open_tickets?sort=updated_at&sort_dir=desc"} | |
activate | |
else | |
tell front window | |
make new tab with properties {URL:"http://poseidon/tickets/list/open_tickets?sort=updated_at&sort_dir=desc"} | |
activate | |
end tell | |
end if | |
end tell | |
end alfred_script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment