Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mrtechnique/5be7ee5cf3ca4602a2546ee73f49566e to your computer and use it in GitHub Desktop.
Save mrtechnique/5be7ee5cf3ca4602a2546ee73f49566e to your computer and use it in GitHub Desktop.
Alfred Chrome Incognito Workflow
tell application "System Events"
set myList to (name of every process)
end tell
if (myList contains "Google Chrome") is false then
do shell script "open -a Google\\ Chrome --new --args -incognito"
else
tell application "Google Chrome"
activate
tell application "System Events" to keystroke "n" using {command down, shift down}
open location "https://google.com/search?q=keyword+number+1"
set myTab to make new tab at end of tabs of window 1
set URL of myTab to "https://google.com/search?q=keyword+number+2"
set myTab to make new tab at end of tabs of window 1
set URL of myTab to "https://google.com/search?q=keyword+number+3"
end tell
end if
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment