laurentiutrif Posted November 8, 2013 Share Posted November 8, 2013 Done - http://d.pr/i/F8Ab It gets stuck on "Retrieving tabs...". Any answer on this? Thanks? Link to comment
ClintonStrong Posted November 9, 2013 Author Share Posted November 9, 2013 This workflow + 1Password are completely awesome. 1Password has these 1 click bookmarks that will jump to a web page and log you in if it's required. I figured out if I gave 1Password and this workflow the same keyword, that they will give me both results in the Alfred list. I tweaked the workflow a little more. Here's what it does now. Changed keyword to "go". Just easier for me to type. Changed 1Password keyword to "go". This combines the output of this workflow and 1Password. Check out the screenshot. "go " shows my shortcut app list that I use all the time. Though after combining this workflow with 1Password, it might not be that useful. "go " + [any text] searches all browser tabs plus 1Password for sites that match [any text]. See the screen shot. [Command]+[Enter] runs an applescript to open alfred and type "go " I'm finding I hardly have to take my fingers off the keyboard. And instead of bookmarks, I'm loading these URLs into 1Password, whether they need UID/Password or not. Link to the workflow. I feel like I've forked your code, but I don't want to share it under a different name and don't want to share my changes under your name. Feel free to include any of my changes into your wordflow. https://dl.dropboxusercontent.com/u/1192535/Go%20to%20browser%20tab.alfredworkflow Awesome. And no worries about the name/attribution, I'm all for people making changes and making it their own. Any answer on this? Thanks? I couldn't reproduce the issue on my end. The only other thing I can think of is to see if your install of Ruby is working correctly. If you open up Terminal and enter this: /usr/bin/ruby -e 'puts RUBY_VERSION' Does it display "1.8.7"? I suppose it also couldn't hurt to go into Disk Utility and repair your disk permissions, in case something got messed up there. Sorry again for the trouble, this one just has me perplexed at the moment. Link to comment
brianb Posted November 13, 2013 Share Posted November 13, 2013 Any chance a modifier key could be added to close the selected tab via alfred? 40-02 1 Link to comment
sudopeople Posted December 9, 2013 Share Posted December 9, 2013 Thanks for continuing work on through Mavericks. I let the workflow be for a week after I updated and it was driving me nuts when I really needed it. Can't live without it now! Link to comment
cdeszaq Posted December 12, 2013 Share Posted December 12, 2013 (edited) I've noticed that with a huge number of tabs, it sits at "Retrieving tabs..." for quite a while. It would be great if this could be sped up somehow. Is there a Github repo that I might be able to contribute back to if I find the time to improve things? Great workflow! Edited December 12, 2013 by cdeszaq Link to comment
Cassady Posted December 13, 2013 Share Posted December 13, 2013 Great workflow! Very useful when I have 30 odd Safari tabs open, all with different academic articles... This has saved me from clicking through them all! Big up's! Link to comment
40-02 Posted January 2, 2014 Share Posted January 2, 2014 Any chance a modifier key could be added to close the selected tab via alfred? +1 Link to comment
suan Posted January 20, 2014 Share Posted January 20, 2014 Any chance a modifier key could be added to close the selected tab via alfred? +1 To this as well. That would make this workflow perfect. Link to comment
xilopaint Posted January 24, 2014 Share Posted January 24, 2014 +1 To this as well. That would make this workflow perfect. +1 Link to comment
ClintonStrong Posted February 1, 2014 Author Share Posted February 1, 2014 I totally agree it should have an option to close tabs... so I've added it. Had to rework most of the code to get it working the way I wanted, so let me know if anything goes awry. You can find the latest version at Packal. Link to comment
M1m1s Posted February 18, 2014 Share Posted February 18, 2014 I purchased the power pack to be able to use this workflow. It's great, although a bit slow when many tabs are open (it may take up to 50' for results to open, and that on a fast computer. I wonder if it would be possible to show website icons on tabs, instead of the Safari or Chrome icon? Many thanks! Link to comment
ClintonStrong Posted February 18, 2014 Author Share Posted February 18, 2014 I purchased the power pack to be able to use this workflow. It's great, although a bit slow when many tabs are open (it may take up to 50' for results to open, and that on a fast computer. I wonder if it would be possible to show website icons on tabs, instead of the Safari or Chrome icon? Many thanks! Thanks. Unfortunately, it doesn't look like there's much I can do to speed it up. Most of the time spent is waiting for a call to AppleScript to complete. It is possible to show favicons for websites, but in most cases they just wouldn't look good. Most favicons are small (16x16), so when you display them in Alfred they would look blurry. Another issue is speed. Both Chrome and Safari store favicon data in an SQLite database, but Chrome locks its database while the app is running. If I wanted to access it, I'd have to copy it to some other location on your drive before I could read it, which could potentially be quite slow. I could probably get the favicon data from Safari fairly quickly, but I'd still need to dynamically generate images for each of the icons and store them someone on your drive. I haven't tested the performance on this yet, so I can't say for sure if it'd create a notable slowdown. Link to comment
aporlebeke Posted February 19, 2014 Share Posted February 19, 2014 For some reason I'm having issues ... every time I try and search my tabs no results are being populated from Chrome. I'm running OS X 10.9 with the most recent version of Chrome and I have 20+ tabs. I've tried forcing an argument in the script filter so that it doesn't search unless I give it something to search for, but it's just defaulting to the basic search options - searching Google, Amazon, or Wikipedia. Any thoughts? Thanks for your help in advance! Link to comment
ClintonStrong Posted February 19, 2014 Author Share Posted February 19, 2014 For some reason I'm having issues ... every time I try and search my tabs no results are being populated from Chrome. I'm running OS X 10.9 with the most recent version of Chrome and I have 20+ tabs. I've tried forcing an argument in the script filter so that it doesn't search unless I give it something to search for, but it's just defaulting to the basic search options - searching Google, Amazon, or Wikipedia. Any thoughts? Thanks for your help in advance! Hm, would you mind checking if any errors are occurring? For the script filter, change the script to the following: ruby filter.rb "{query}" 2> ~/Desktop/errorlog.txt Run the workflow in Alfred, and check your desktop for a file called errorlog.txt. Let me know if anything's being logged there. Link to comment
aporlebeke Posted February 19, 2014 Share Posted February 19, 2014 It did create an errorlog.txt file. Looks like it's getting errors ... Thoughts? Thank you thank you /Users/AP/Dropbox/Alfred Sync/Alfred.alfredpreferences/workflows/user.workflow.00AAD8B0-1E92-422F-AB71-9C25FAEA482F/browser_tabs/applescript_utils.rb:30:in `block in osascript': AppleScript error: 2014-02-19 00:06:55.747 osascript[35947:507] Error loading /Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: dlopen(/Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types, 262): no suitable image found. Did find: (BrowserTabs::AppleScriptUtils::AppleScriptError) /Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: no matching architecture in universal wrapper osascript: OpenScripting.framework - scripting addition "/Library/ScriptingAdditions/Adobe Unit Types.osax" declares no loadable handlers. from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open3.rb:217:in `popen_run' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open3.rb:99:in `popen3' from /Users/AP/Dropbox/Alfred Sync/Alfred.alfredpreferences/workflows/user.workflow.00AAD8B0-1E92-422F-AB71-9C25FAEA482F/browser_tabs/applescript_utils.rb:25:in `osascript' from /Users/AP/Dropbox/Alfred Sync/Alfred.alfredpreferences/workflows/user.workflow.00AAD8B0-1E92-422F-AB71-9C25FAEA482F/browser_tabs/applescript_utils.rb:11:in `run' from /Users/AP/Dropbox/Alfred Sync/Alfred.alfredpreferences/workflows/user.workflow.00AAD8B0-1E92-422F-AB71-9C25FAEA482F/browser_tabs/commands/command.rb:42:in `run' from /Users/AP/Dropbox/Alfred Sync/Alfred.alfredpreferences/workflows/user.workflow.00AAD8B0-1E92-422F-AB71-9C25FAEA482F/browser_tabs.rb:51:in `run_command' from /Users/AP/Dropbox/Alfred Sync/Alfred.alfredpreferences/workflows/user.workflow.00AAD8B0-1E92-422F-AB71-9C25FAEA482F/browser_tabs.rb:24:in `tabs' from filter.rb:7:in `<main>' Link to comment
ClintonStrong Posted February 19, 2014 Author Share Posted February 19, 2014 It did create an errorlog.txt file. Looks like it's getting errors ... Thoughts? Thank you thank you /Users/AP/Dropbox/Alfred Sync/Alfred.alfredpreferences/workflows/user.workflow.00AAD8B0-1E92-422F-AB71-9C25FAEA482F/browser_tabs/applescript_utils.rb:30:in `block in osascript': AppleScript error: 2014-02-19 00:06:55.747 osascript[35947:507] Error loading /Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: dlopen(/Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types, 262): no suitable image found. Did find: (BrowserTabs::AppleScriptUtils::AppleScriptError) /Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: no matching architecture in universal wrapper osascript: OpenScripting.framework - scripting addition "/Library/ScriptingAdditions/Adobe Unit Types.osax" declares no loadable handlers. from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open3.rb:217:in `popen_run' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open3.rb:99:in `popen3' from /Users/AP/Dropbox/Alfred Sync/Alfred.alfredpreferences/workflows/user.workflow.00AAD8B0-1E92-422F-AB71-9C25FAEA482F/browser_tabs/applescript_utils.rb:25:in `osascript' from /Users/AP/Dropbox/Alfred Sync/Alfred.alfredpreferences/workflows/user.workflow.00AAD8B0-1E92-422F-AB71-9C25FAEA482F/browser_tabs/applescript_utils.rb:11:in `run' from /Users/AP/Dropbox/Alfred Sync/Alfred.alfredpreferences/workflows/user.workflow.00AAD8B0-1E92-422F-AB71-9C25FAEA482F/browser_tabs/commands/command.rb:42:in `run' from /Users/AP/Dropbox/Alfred Sync/Alfred.alfredpreferences/workflows/user.workflow.00AAD8B0-1E92-422F-AB71-9C25FAEA482F/browser_tabs.rb:51:in `run_command' from /Users/AP/Dropbox/Alfred Sync/Alfred.alfredpreferences/workflows/user.workflow.00AAD8B0-1E92-422F-AB71-9C25FAEA482F/browser_tabs.rb:24:in `tabs' from filter.rb:7:in `<main>' It looks like that's being caused by an out of date scripting addition. Try updating it and let me know if that fixes it. http://helpx.adobe.com/photoshop/kb/unit-type-conversion-error-applescript.html If all goes well and it works, you can go ahead and remove the debugging code: ruby filter.rb "{query}" Link to comment
aporlebeke Posted February 19, 2014 Share Posted February 19, 2014 It looks like that's being caused by an out of date scripting addition. Try updating it and let me know if that fixes it. http://helpx.adobe.com/photoshop/kb/unit-type-conversion-error-applescript.html If all goes well and it works, you can go ahead and remove the debugging code: ruby filter.rb "{query}" That fixed it! THANK YOU THANK YOU! Much appreciated! Link to comment
gravicle Posted May 27, 2014 Share Posted May 27, 2014 I tried the solutions listed on the Adobe "Unit type conversion error" support page but nothing seems to help. Here is the error log: /Users/[username]/Dropbox/Productivity-tools/Alfred.alfredpreferences/workflows/user.workflow.8C375D70-662E-4FC5-8FD8-9BD0F84E547F/browser_tabs/applescript_utils.rb:30:in `block in osascript': AppleScript error: 2014-05-26 21:35:32.757 osascript[741:507] Error loading /Library/ScriptingAdditions/QXPScriptingAdditions.osax/Contents/MacOS/QXPScriptingAdditions: dlopen(/Library/ScriptingAdditions/QXPScriptingAdditions.osax/Contents/MacOS/QXPScriptingAdditions, 262): no suitable image found. Did find: (BrowserTabs::AppleScriptUtils::AppleScriptError) /Library/ScriptingAdditions/QXPScriptingAdditions.osax/Contents/MacOS/QXPScriptingAdditions: mach-o, but wrong architecture osascript: OpenScripting.framework - scripting addition "/Library/ScriptingAdditions/QXPScriptingAdditions.osax" declares no loadable handlers. from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open3.rb:217:in `popen_run' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open3.rb:99:in `popen3' from /Users/gravicle/Dropbox/Productivity-tools/Alfred.alfredpreferences/workflows/user.workflow.8C375D70-662E-4FC5-8FD8-9BD0F84E547F/browser_tabs/applescript_utils.rb:25:in `osascript' from /Users/gravicle/Dropbox/Productivity-tools/Alfred.alfredpreferences/workflows/user.workflow.8C375D70-662E-4FC5-8FD8-9BD0F84E547F/browser_tabs/applescript_utils.rb:11:in `run' from /Users/gravicle/Dropbox/Productivity-tools/Alfred.alfredpreferences/workflows/user.workflow.8C375D70-662E-4FC5-8FD8-9BD0F84E547F/browser_tabs/commands/command.rb:42:in `run' from /Users/gravicle/Dropbox/Productivity-tools/Alfred.alfredpreferences/workflows/user.workflow.8C375D70-662E-4FC5-8FD8-9BD0F84E547F/browser_tabs.rb:51:in `run_command' from /Users/gravicle/Dropbox/Productivity-tools/Alfred.alfredpreferences/workflows/user.workflow.8C375D70-662E-4FC5-8FD8-9BD0F84E547F/browser_tabs.rb:24:in `tabs' from filter.rb:7:in `<main>' Link to comment
exalyon Posted September 19, 2014 Share Posted September 19, 2014 (edited) EDIT: the OP helped me and it now works as I want. I will post what I changed because I am sure (uhm, I hope) there are humans like me that does not understand coding well. 1) to customize icons, modify the filter.rb file where it says def icon_for_tab 2) to display tabs in safari order "remove :uid => tab.url," from filter.rb This is in my opinion the best workflow for tabs and it works well with the "open safari tab in chrome and viceversa", which is useful if you do not use flash or just need chrome sometimes. Download now! Edited September 21, 2014 by exalyon Link to comment
szeitlin Posted September 22, 2014 Share Posted September 22, 2014 hi, this is not working for me at all (Mavericks 10.9.4, Safari 7.0.6). I've been looking for something with this functionality for *ages*, so I'd really like to use it. Any chance this will be updated to run correctly, or that you'll post something with step-by-step instructions explaining *exactly* what needs to be changed for which version(s) of Ruby & whatever else needs patching? I just paid for a powerpack license to be able to use this workflow, and now I'm not sure if it was worth the money. Link to comment
ClintonStrong Posted September 22, 2014 Author Share Posted September 22, 2014 hi, this is not working for me at all (Mavericks 10.9.4, Safari 7.0.6). I've been looking for something with this functionality for *ages*, so I'd really like to use it. Any chance this will be updated to run correctly, or that you'll post something with step-by-step instructions explaining *exactly* what needs to be changed for which version(s) of Ruby & whatever else needs patching? I just paid for a powerpack license to be able to use this workflow, and now I'm not sure if it was worth the money. Sorry about that. Could you turn on error reporting and let me know what errors are being logged? You can get there by selecting the workflow and pressing the bug icon in the top right corner. Link to comment
exalyon Posted September 23, 2014 Share Posted September 23, 2014 Hi again, I think I found a bug: if I open a safari tab in chrome and try to kill the tab in safari from your workflow, both tabs are deleted. This happens if I copy and paste the link and if I use the open-in-chrome workflow. I just paid for a powerpack license to be able to use this workflow, and now I'm not sure if it was worth the money. It was probably the best choice after buying a mac : ) Link to comment
ClintonStrong Posted September 23, 2014 Author Share Posted September 23, 2014 Hi again, I think I found a bug: if I open a safari tab in chrome and try to kill the tab in safari from your workflow, both tabs are deleted. This happens if I copy and paste the link and if I use the open-in-chrome workflow. Oh, right. That happens because the workflow identifies each tab with a URL, but doesn't associate the browser with it. So if you tell it to close a tab, all it knows is that you want to close a particular URL. Alfred used to only be able to copy the "arg" of a result when you hit cmd+c, so while I could have added the browser to the arg, you'd end up copying URLs like "chrome;http://google.com/". I instead opted to only use the URL of the tab as the arg, which unfortunately means you'll have issues like the one you described. I just looked in to it though, and it seems Alfred v2.3 has a fix for this. I'll try to get it updated later today. 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