Jump to content

bmccormack

Member
  • Posts

    1
  • Joined

  • Last visited

Posts posted by bmccormack

  1. I combined avayl's original post with Vítor's suggestions, cleaned up a few of the calls to Google Chrome (my installation was trying to start Chrome in parallels, which is weird), and came up with the following:

     

    New Chrome Window

    on alfred_script(q)
    tell application "/Applications/Google Chrome.app"
         make new window
         activate
    end tell
    end alfred_script
    

    New Chrome Tab

    on alfred_script(q)
    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 '/Applications/Google Chrome.app' --new --args"
    else
    	tell application "/Applications/Google Chrome.app" to make new tab at end of tabs of front window
    end if
    end alfred_script
    

    New Chrome Incognito Window

    on alfred_script(q)
    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 '/Applications/Google Chrome.app' --new --args --incognito"
    else
    	tell application "/Applications/Google Chrome.app" to make new window with properties {mode:"incognito"}
    end if
    end alfred_script
    
×
×
  • Create New...