Jump to content

AvantGardener

Member
  • Posts

    2
  • Joined

  • Last visited

  • Days Won

    1

AvantGardener last won the day on August 20 2018

AvantGardener had the most liked content!

Profile Information

  • Location
    Sacramento, CA

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

AvantGardener's Achievements

Helping Hand

Helping Hand (3/5)

1

Reputation

  1. For those who prefer Google Chrome over Safari, here's the alternative AppleScript that should enable the same background search features in Chrome: set myURL to "https://www.google.com/search?q={query}" tell application "Google Chrome" set activeIndex to get active tab index of window 1 tell window 1 set newTab to make new tab with properties {URL:myURL} end tell set active tab index of window 1 to activeIndex end tell —Michael
  2. Howdy Fellow Alfred-itors! I've been trying to figure out how I could modify Alfred's awesome keyword / search engine feature to enable me to do a Google search in a new background tab—i.e., *without* automatically shifting from my current browser tab (or current application) to the new browser tab where the search opens, as Alfred does by default. There were a few forum posts over the years from users seeking this feature—but none of them was satisfactorily answered… Ha, but since I managed to figure out a workaround riiiiiight before I was about to give up, I thought I'd pay it forward and post it here —> since perhaps there are other users who'd like to enable to this search-in-background feature. This workflow enables you to (1) search Google using Alfred while browsing in Safari in a new background tab—as well as (2) to stay in a different (i.e., non-Safari) app and run the Google search entirely in the background… which can be helpful if you're, say, poring over an Excel spreadsheet and you want to remember to Google search something later—but don't want your focus to get yanked away from your current work. It's a simple two-step workflow design: INPUTS = "Keyword" —> ACTIONS = "Run Script" NOTE: You must select "/usr/bin/osacript (AS)" from the "Language" drop-down menu on the script action—and then select "with input as {query}" from the adjacent drop-down. Here is the Applescript to enter into the "Script" box: set myURL to "https://www.google.com/search?q={query}" tell application "Safari" tell front window make new tab at end of tabs with properties {URL:myURL} end tell end tell And finally, here are screen-grabs of how I configured both workflow items: I hope someone out there finds this helpful! Cheers, —Michael
×
×
  • Create New...