Subject22 Posted April 9, 2013 Posted April 9, 2013 (edited) I removed Flash from my system long ago but occasionally I need to make use of the version bundled with Chrome to view certain web pages properly. There are a few workflows like this around, but as the only browsers I use are Safari and Chrome I wanted something a little more direct than Send URL which led me to this alternative made by Runar. There were a few issues with that workflow, so I made a version which (hopefully) deals with everything in a tidy and intelligent manner. If Safari is either not open, or has no windows open, the workflow will post a notification saying so. If you'd like it to also post notifications when URLs are successfully sent to Chrome open the workflow folder (right click the workflow in Alfred and click Show in Finder) and edit the appropriate line in open_in_chrome.scpt (it's clearly marked). The reverse behaviour is also available (i.e.: sending URLs from Chrome to Safari). Hat tip to Carlos-Sz for getting Alfred to run the Applescript properly 🙂 Download (v1.0.2): Open in Chrome GitHub Keywords: openinchrome, openinsafari Edited August 12, 2019 by Subject22 fascinator!, nikivi, Carlos-Sz and 3 others 6
James Posted April 12, 2013 Posted April 12, 2013 i like this but is there a way to make it open on a new chrome tab. Right now, if I have a chrome window currently open and activate this workflow, it will activate in my current chrome tab and i think it is better if it opened a new tab instead of replacing it.
Subject22 Posted April 12, 2013 Author Posted April 12, 2013 That's a fair point. I've updated the script behind the current link. Just download a new copy, reimport it and let me know if it does what you want :-) I also added logic to see if the current Safari tab is already open in Chrome, in which case the workflow will post a notification saying so and take no further action.
James Posted April 12, 2013 Posted April 12, 2013 (edited) is the updated workflow link the one in your original post (dropbox)? it still replaces instead of opening new tab. it might be some problem on my end so if there's any test you want me to run, that's fine. Edited April 12, 2013 by James
Subject22 Posted April 12, 2013 Author Posted April 12, 2013 (edited) Oh that is bizarre. The file that that link refers to on my local machine is correct. The file that that link refers to on my dropbox account online is correct. But actually clicking that link serves up an old version of the file. Try this: http://d.pr/f/Q7vP. Link in the first post now works again. Edited April 12, 2013 by Subject22 James 1
seandoherty91 Posted April 16, 2013 Posted April 16, 2013 (edited) Is there any way you could make a version of this WorkFlow that does the opposite or just tell me how to manipulate the apple script to do the opposite (open chrome tab in Safari)? I often find that certain sites require the use of Safari for whatever reason. ex. DirectTV requires it for viewing of On Demand programming online. Thanks for the help. Edited April 16, 2013 by seandoherty91
Subject22 Posted April 16, 2013 Author Posted April 16, 2013 Off the top of my head, opening the AppleScript in the workflow folder and changing every instance of "Chrome" to "Safari" and every instance of "Safari" to "Chrome" ought to work. Try it anyway and if it doesn't do what you want let me know and I'll take a look when I can :-)
roccitman Posted April 16, 2013 Posted April 16, 2013 Funny. It opens Chrome for Windows in Parallels. Working on the script to see if I can put a finer point on what Chrome to open
Subject22 Posted April 16, 2013 Author Posted April 16, 2013 This might help :-) http://stackoverflow.com/questions/4956445/virtual-machine-browser-is-considered-by-the-applescript-if-parallels-are-instal
mrwayne Posted April 23, 2013 Posted April 23, 2013 Hey there, Thanks for this extension. I use it all the time and previous solutions had been unreliable. I'm having trouble getting this to work properly when chrome is not already open. When I invoke the shortcut, it opens Chrome but won't send the link through. If I go back to safari and invoke the shortcut a second time, it works perfectly. If Chrome is already open, it also works perfectly. Any ideas here? Thanks!
Subject22 Posted April 24, 2013 Author Posted April 24, 2013 OK, that's interesting, it definitely works fine on my end. I can't look into that right at the moment, but I'll get back to you when I get a chance. Roughly how long does it take Chrome to launch from closed for you? In seconds, and 'bounces' if you can. mrwayne 1
mrwayne Posted April 25, 2013 Posted April 25, 2013 Thanks, and no rush at all. Chrome takes just a second to launch, maybe one bounce, if even. I'm now noticing that if I don't have any windows open and leave chrome open, the extension doesn't work at all. Chrome becomes the active application, but the link doesn't open in chrome unless i have a window already open. Thanks again!
mrwayne Posted May 23, 2013 Posted May 23, 2013 Hey there, Any chance of taking a look at my little issue? Thanks again for the script! Subject22 1
avk_tp Posted May 23, 2013 Posted May 23, 2013 Hey hey, I was having the same issue. I got around it by having the openinchrome workflow also open up chrome when I go to use it (see below). With this method, if chrome is already open it just adds an extra tab, whereas if it's not it opens up a new window. The only slight glitch is that in the latter case it opens up an extra tab as well, but it's not a real problem unless you're a perfectionist. mrwayne 1
AxelPeigne Posted May 24, 2013 Posted May 24, 2013 Hi there, I'm posting here because I find this workflow very interesting, but I'm using SRWare Iron instead of Chrome. So I modified it to make it work with Iron too, and you can see my workflow on this topic. I also noticed the problem when you have no window opened in Chrome so I changed the script in my workflow to solve this problem. I invite you, Subject22, to use my modified script to solve this problem in your workflow as well if you think it's a better solution . Thanks Axel mrwayne 1
Subject22 Posted May 25, 2013 Author Posted May 25, 2013 I'm currently working 8am-3am days (well, studying, technically), and probably will be for the next few weeks, but if you're still having trouble on, say, the 24th of June post here again mrwayne and I'll be happy to look into it :-) mrwayne 1
Jude Posted June 7, 2013 Posted June 7, 2013 (edited) Hi there, I've found that there is still no method to open the current tab in Chrome when it has no window already opened. Although we can change the workflow to let Chrome opening new window like avi_tp's suggest, but it would opens up an extra tab as well. So I just re-writed a little code to make the script run correctly, now you can use this script and don't need to worried about whether there's a window opened or not. Below is the updated workflow, thanks. Download: Open in Chrome Edited June 7, 2013 by Jude
Subject22 Posted June 7, 2013 Author Posted June 7, 2013 (edited) Thanks for that Jude! I've gone ahead and modified the script myself anyway (you can re-download it from the same link in the first post). The new version tidies up that annoying extra "blank" tab in addition to working when Chrome doesn't have a window open. If someone could confirm that everything works now that'd be great :-) Edited June 7, 2013 by Subject22 Jude and mrwayne 2
munich1204 Posted June 8, 2013 Posted June 8, 2013 (edited) The new workflow works great for me. Edited June 8, 2013 by munich1204
erravid Posted July 1, 2013 Posted July 1, 2013 (edited) Hey, Thanks for this great workflow! I have customized it and added this at line 6, in order to close the tab in Safari automatically: close (every tab of front window whose name is equal to pageName) Very useful to me, so I thought it could be interesting to share Edited July 1, 2013 by Xavier
Subject22 Posted July 1, 2013 Author Posted July 1, 2013 No problem! I thought about implementing an auto-close feature but decided against it as it seemed like a personal preference sort of thing. Thanks for posting your code, hopefully other people'll find it useful :-)
fascinator! Posted July 3, 2013 Posted July 3, 2013 Thank you so much for this awesomeness. Works perfectly. But I've been really frustrated with no code for the reverse action, as in "Open Chrome tab in Safari." I'm no coder but your code made it very easy for me to modify. Replacing "Chrome"s with "Safari"s and vice versa didn't work because one uses "active tab" and the other "current tab." So I changed them accordingly as well. There were a few other problems but nothing I couldn't solve with some Googling. So now I can immediately switch between the two whenever I want by using this code with yours: http://d.pr/f/zsom However there are some kinks. 1) If Safari is open but there is no window, the script doesn't work. Just brings the windowless Safari to focus and dies. 2) If Safari is completely closed, the script works only sometimes. Sometimes it just opens a new blank window but doesn't open the page, and sometimes works as it should. It would be awesome if someone could clean out these kinks. I guess they should be easy enough to deal with, but I simply don't know how. Thanks again.
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