Skip to content

Instantly share code, notes, and snippets.

@cbuck
Last active October 6, 2015 07:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cbuck/2962202 to your computer and use it in GitHub Desktop.
Save cbuck/2962202 to your computer and use it in GitHub Desktop.
Alfred snippets
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