Yuri Posted July 21, 2017 Share Posted July 21, 2017 How to open url or keyword link with Alfred Bar, but to stay on the same tab? I want to open new tab without leaving current focused tab. Thank you for any help! Link to comment
RodgerWW Posted July 21, 2017 Share Posted July 21, 2017 Try this with AppleScript : set myURL to "https://www.google.com" -- Replace URL with your own or with the {query} tell application "Safari" tell front window make new tab at end of tabs with properties {URL:myURL} end tell end tell Yuri 1 Link to comment
Yuri Posted July 21, 2017 Author Share Posted July 21, 2017 Rodger, thanks for the quick response. But this workflow doesn't work. https://yadi.sk/d/3d46Aj503LGqev I don't know what I am doing wrong. What do you think? Link to comment
deanishe Posted July 21, 2017 Share Posted July 21, 2017 It works for me, although I think it crashed Safari the first time I ran it… Link to comment
RodgerWW Posted July 21, 2017 Share Posted July 21, 2017 I have no idea why it wouldn't work for you Yuri, sorry. Link to comment
Yuri Posted July 22, 2017 Author Share Posted July 22, 2017 Don't know why, but this wf suddenly works for me too! It works perfect for url address (thank you RodgerWW!), but doesn't work for Alfred keywords. Is there any chance to use it with other workflows? For example, in Alfred bar, to search in Google, I usually use: "g test", but if it needs to open the page in background, what if I use: "bg g test" or something like this, maybe action modifier. The case is, I actually don't always have exact url, but have the word which I write with keywords in Alfred Bar. I think there is a solution to use snippets instead default searches, ie "//go" to paste https://www.google.ru/search?q= . And for this feature I need to write snippets for every searches, which is more than 100. Maybe there is a more convenient solution? Link to comment
deanishe Posted July 23, 2017 Share Posted July 23, 2017 On 22/07/2017 at 3:09 AM, Yuri said: I need to write snippets for every searches, which is more than 100. Maybe there is a more convenient solution? Not really, no. Alfred can't possibly guess which URLs you want to open, so you have to write them down somewhere. A better solution than snippets would probably be a List Filter. Yuri 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now