exalyon Posted September 23, 2014 Share Posted September 23, 2014 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. Ah, ok. Thank your for the explanation and for the great work. Link to comment
szeitlin Posted September 23, 2014 Share Posted September 23, 2014 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. Starting debug for 'Search Safari and Chrome Tabs' [ERROR: alfred.workflow.input.scriptfilter] Code 1: /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/applescript_utils.rb:30:in `block in osascript': AppleScript error: 2014-09-23 12:50:15.535 osascript[15430: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/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/applescript_utils.rb:25:in `osascript' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/applescript_utils.rb:11:in `run' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/commands/command.rb:42:in `run' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs.rb:51:in `run_command' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs.rb:24:in `tabs' from filter.rb:7:in `<main>' [ERROR: alfred.workflow.input.scriptfilter] Code 1: /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/applescript_utils.rb:30:in `block in osascript': AppleScript error: 2014-09-23 12:50:22.621 osascript[15436: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/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/applescript_utils.rb:25:in `osascript' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/applescript_utils.rb:11:in `run' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/commands/command.rb:42:in `run' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs.rb:51:in `run_command' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs.rb:24:in `tabs' from filter.rb:7:in `<main>' [ERROR: alfred.workflow.input.scriptfilter] Code 1: /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/applescript_utils.rb:30:in `block in osascript': AppleScript error: 2014-09-23 12:50:23.227 osascript[15442: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/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/applescript_utils.rb:25:in `osascript' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/applescript_utils.rb:11:in `run' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/commands/command.rb:42:in `run' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs.rb:51:in `run_command' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs.rb:24:in `tabs' from filter.rb:7:in `<main>' [ERROR: alfred.workflow.input.scriptfilter] Code 1: /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/applescript_utils.rb:30:in `block in osascript': AppleScript error: 2014-09-23 12:50:23.918 osascript[15448: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/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/applescript_utils.rb:25:in `osascript' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/applescript_utils.rb:11:in `run' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/commands/command.rb:42:in `run' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs.rb:51:in `run_command' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs.rb:24:in `tabs' from filter.rb:7:in `<main>' [ERROR: alfred.workflow.input.scriptfilter] Code 1: /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/applescript_utils.rb:30:in `block in osascript': AppleScript error: 2014-09-23 12:50:24.477 osascript[15454: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/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/applescript_utils.rb:25:in `osascript' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/applescript_utils.rb:11:in `run' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/commands/command.rb:42:in `run' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs.rb:51:in `run_command' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs.rb:24:in `tabs' from filter.rb:7:in `<main>' [ERROR: alfred.workflow.input.scriptfilter] Code 1: /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/applescript_utils.rb:30:in `block in osascript': AppleScript error: 2014-09-23 12:50:25.077 osascript[15460: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/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/applescript_utils.rb:25:in `osascript' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/applescript_utils.rb:11:in `run' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/commands/command.rb:42:in `run' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs.rb:51:in `run_command' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs.rb:24:in `tabs' from filter.rb:7:in `<main>' [ERROR: alfred.workflow.input.scriptfilter] Code 1: /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/applescript_utils.rb:30:in `block in osascript': AppleScript error: 2014-09-23 12:50:25.657 osascript[15466: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/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/applescript_utils.rb:25:in `osascript' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/applescript_utils.rb:11:in `run' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/commands/command.rb:42:in `run' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs.rb:51:in `run_command' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs.rb:24:in `tabs' from filter.rb:7:in `<main>' [ERROR: alfred.workflow.input.scriptfilter] Code 1: /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/applescript_utils.rb:30:in `block in osascript': AppleScript error: 2014-09-23 12:50:26.417 osascript[15472: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/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/applescript_utils.rb:25:in `osascript' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/applescript_utils.rb:11:in `run' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/commands/command.rb:42:in `run' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs.rb:51:in `run_command' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs.rb:24:in `tabs' from filter.rb:7:in `<main>' [ERROR: alfred.workflow.input.scriptfilter] Code 1: /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/applescript_utils.rb:30:in `block in osascript': AppleScript error: 2014-09-23 12:50:26.981 osascript[15478: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/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/applescript_utils.rb:25:in `osascript' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/applescript_utils.rb:11:in `run' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/commands/command.rb:42:in `run' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs.rb:51:in `run_command' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs.rb:24:in `tabs' from filter.rb:7:in `<main>' [ERROR: alfred.workflow.input.scriptfilter] Code 1: /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/applescript_utils.rb:30:in `block in osascript': AppleScript error: 2014-09-23 12:50:27.483 osascript[15484: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/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/applescript_utils.rb:25:in `osascript' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/applescript_utils.rb:11:in `run' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/commands/command.rb:42:in `run' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs.rb:51:in `run_command' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs.rb:24:in `tabs' from filter.rb:7:in `<main>' [ERROR: alfred.workflow.input.scriptfilter] Code 1: /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/applescript_utils.rb:30:in `block in osascript': AppleScript error: 2014-09-23 12:50:28.023 osascript[15490: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/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/applescript_utils.rb:25:in `osascript' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/applescript_utils.rb:11:in `run' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/commands/command.rb:42:in `run' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs.rb:51:in `run_command' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs.rb:24:in `tabs' from filter.rb:7:in `<main>' [ERROR: alfred.workflow.input.scriptfilter] Code 1: /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/applescript_utils.rb:30:in `block in osascript': AppleScript error: 2014-09-23 12:50:28.534 osascript[15496: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/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/applescript_utils.rb:25:in `osascript' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/applescript_utils.rb:11:in `run' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/commands/command.rb:42:in `run' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs.rb:51:in `run_command' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs.rb:24:in `tabs' from filter.rb:7:in `<main>' [ERROR: alfred.workflow.input.scriptfilter] Code 1: /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/applescript_utils.rb:30:in `block in osascript': AppleScript error: 2014-09-23 12:50:30.630 osascript[15505: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/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/applescript_utils.rb:25:in `osascript' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/applescript_utils.rb:11:in `run' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/commands/command.rb:42:in `run' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs.rb:51:in `run_command' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs.rb:24:in `tabs' from filter.rb:7:in `<main>' [ERROR: alfred.workflow.input.scriptfilter] Code 1: /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/applescript_utils.rb:30:in `block in osascript': AppleScript error: 2014-09-23 12:50:31.385 osascript[15512: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/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/applescript_utils.rb:25:in `osascript' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/applescript_utils.rb:11:in `run' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/commands/command.rb:42:in `run' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs.rb:51:in `run_command' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs.rb:24:in `tabs' from filter.rb:7:in `<main>' Link to comment
ClintonStrong Posted September 23, 2014 Author Share Posted September 23, 2014 Starting debug for 'Search Safari and Chrome Tabs' [ERROR: alfred.workflow.input.scriptfilter] Code 1: /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/applescript_utils.rb:30:in `block in osascript': AppleScript error: 2014-09-23 12:50:15.535 osascript[15430: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/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/applescript_utils.rb:25:in `osascript' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/applescript_utils.rb:11:in `run' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/commands/command.rb:42:in `run' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs.rb:51:in `run_command' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs.rb:24:in `tabs' from filter.rb:7:in `<main>' I believe that error's caused by an out of date scripting addition. Try following the steps here to fix it: http://helpx.adobe.com/photoshop/kb/unit-type-conversion-error-applescript.html Let me know if everything works after that. Link to comment
szeitlin Posted September 23, 2014 Share Posted September 23, 2014 I believe that error's caused by an out of date scripting addition. Try following the steps here to fix it: http://helpx.adobe.com/photoshop/kb/unit-type-conversion-error-applescript.html Let me know if everything works after that. I updated the Adobe Unit Types to version 2.1.0 I'm still getting what looks like the same error. Now it seems to error out on launching using the hot keys, before I can even enter a search parameter. [ERROR: alfred.workflow.input.scriptfilter] Code 1: /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/applescript_utils.rb:30:in `block in osascript': AppleScript error: 2014-09-23 14:42:05.654 osascript[16247:507] Cannot find executable for CFBundle 0x7fd51144fcf0 </Library/ScriptingAdditions/Adobe Unit Types.osax> (not loaded) (BrowserTabs::AppleScriptUtils::AppleScriptError) osascript: OpenScripting.framework - scripting addition "/Library/ScriptingAdditions/Adobe Unit Types.osax" declares no loadable handlers. 2014-09-23 14:42:05.664 osascript[16247:507] Error loading /Library/ScriptingAdditions/old_Adobe_Unit_Types.osax/Contents/MacOS/Adobe Unit Types: dlopen(/Library/ScriptingAdditions/old_Adobe_Unit_Types.osax/Contents/MacOS/Adobe Unit Types, 262): no suitable image found. Did find: /Library/ScriptingAdditions/old_Adobe_Unit_Types.osax/Contents/MacOS/Adobe Unit Types: no matching architecture in universal wrapper osascript: OpenScripting.framework - scripting addition "/Library/ScriptingAdditions/old_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/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/applescript_utils.rb:25:in `osascript' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/applescript_utils.rb:11:in `run' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs/commands/command.rb:42:in `run' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs.rb:51:in `run_command' from /Users/szeitlin/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.53C2BE3D-1840-4712-A682-C6F758ECF131/browser_tabs.rb:24:in `tabs' from filter.rb:7:in `<main>' Link to comment
szeitlin Posted September 23, 2014 Share Posted September 23, 2014 to be clear, since I didn't put this in there, I unzipped the archive they provided, and it said this: creating: Adobe Unit Types.osax/ creating: Adobe Unit Types.osax/Contents/ inflating: Adobe Unit Types.osax/Contents/Info.plist creating: Adobe Unit Types.osax/Contents/MacOS/ inflating: Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types creating: Adobe Unit Types.osax/Contents/Resources/ inflating: Adobe Unit Types.osax/Contents/Resources/Adobe Unit Types.rsrc creating: Adobe Unit Types.osax/Contents/Resources/English.lproj/ inflating: Adobe Unit Types.osax/Contents/Resources/English.lproj/InfoPlist.strings If I list the directory, it looks like the zipped file is there (along with the old one, which I renamed), but the 'new' one is from August 2009? Also, I'm wondering what that 'not loaded' error means - do I need to restart/rehash/rebuild something so it knows to use the new one? /Library/ScriptingAdditions$ ls -l total 56 -rwxrwxrwx@ 1 root admin 6071 Mar 16 2005 Adobe Unit Types drwx------ 3 root wheel 102 Aug 6 2009 Adobe Unit Types.osax -rw-r--r--@ 1 root wheel 15782 Sep 23 14:38 Adobe_Unit_Types.osax.zip drwxrwxr-x 3 root admin 102 Jan 2 2008 old_Adobe_Unit_Types.osax Link to comment
ClintonStrong Posted September 23, 2014 Author Share Posted September 23, 2014 to be clear, since I didn't put this in there, I unzipped the archive they provided, and it said this: creating: Adobe Unit Types.osax/ creating: Adobe Unit Types.osax/Contents/ inflating: Adobe Unit Types.osax/Contents/Info.plist creating: Adobe Unit Types.osax/Contents/MacOS/ inflating: Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types creating: Adobe Unit Types.osax/Contents/Resources/ inflating: Adobe Unit Types.osax/Contents/Resources/Adobe Unit Types.rsrc creating: Adobe Unit Types.osax/Contents/Resources/English.lproj/ inflating: Adobe Unit Types.osax/Contents/Resources/English.lproj/InfoPlist.strings If I list the directory, it looks like the zipped file is there (along with the old one, which I renamed), but the 'new' one is from August 2009? Also, I'm wondering what that 'not loaded' error means - do I need to restart/rehash/rebuild something so it knows to use the new one? /Library/ScriptingAdditions$ ls -l total 56 -rwxrwxrwx@ 1 root admin 6071 Mar 16 2005 Adobe Unit Types drwx------ 3 root wheel 102 Aug 6 2009 Adobe Unit Types.osax -rw-r--r--@ 1 root wheel 15782 Sep 23 14:38 Adobe_Unit_Types.osax.zip drwxrwxr-x 3 root admin 102 Jan 2 2008 old_Adobe_Unit_Types.osax I think you may have to restart your computer for the updates to apply (if you haven't already). I haven't encountered the error on my own system, so I'm not entirely sure if that's the issue, but it's worth a try. Link to comment
szeitlin Posted September 24, 2014 Share Posted September 24, 2014 ha, I tried restarting, and it didn't fix the problem with your workflow, but it did break a few other things on my machine (IPython was throwing errors, among other things). So I had to change it back. Any other ideas what the problem(s) might be or ways to make it usable? Link to comment
ClintonStrong Posted September 24, 2014 Author Share Posted September 24, 2014 (edited) ha, I tried restarting, and it didn't fix the problem with your workflow, but it did break a few other things on my machine (IPython was throwing errors, among other things). So I had to change it back. Any other ideas what the problem(s) might be or ways to make it usable? Could you try this workflow and let me know if it works for you? Install it, type in "example", and hit enter. It should show a dialog saying "It works!". http://cl.ly/2j2E3D2H3b0F If that works for you, I'll work on changing the way the workflow makes AppleScript calls. Hopefully that'll fix it. Edited September 24, 2014 by Clinton Strong szeitlin 1 Link to comment
sudopeople Posted September 29, 2014 Share Posted September 29, 2014 (edited) So I'm a bit of a tab hoarder. I usually have three or four windows open, each with 5-10 tabs. I often have a YouTube video playing on one of them, either a podcast of sorts, or playlist with music, even just random videos of stuff I'm researching. If I restart Chrome or OS X I'm often presented with 3 or 4 (sometimes more) YouTube videos playing at once. Chrome has an awesome way of helping me find the noisy ones by showing a speaker icon on the tab, but when I've got multiple windows going on multiple workspaces, or even minimized windows, it can be quite the treasure hunt. Do you know of any way to list tabs that are marked as "playing audio" by Chrome in an Alfred workflow? I can tell it's not just a wingding or something added to the title because when I see those tab names in Alfred, they don't have any type of playing symbol. I would imagine it would be some magical, undocumented AppleScript command if it's possible at all. Oh, and obviously I can just Alfred "tabs youtube" but the secret noise is not always a YouTube video. The worst offenders are news sites that autoplay a tiny video. Sometime I open a few articles I want to read in new tabs, then get side tracked and a minute later the video(s) load and I can't find them easily. Edited September 29, 2014 by sudopeople Link to comment
szeitlin Posted October 6, 2014 Share Posted October 6, 2014 it works! At least, the example apple script works. Sorry I disappeared for a while there. Link to comment
szeitlin Posted October 21, 2014 Share Posted October 21, 2014 hey so do you think that fix will fix it? still hoping to use this if you have time to implement whatever that test script did differently... Link to comment
etling Posted January 8, 2015 Share Posted January 8, 2015 Just wanted to bump this topic and see if there's a new version that works on OSX Yosemite? I love this workflow, it saves me a ton of time. Currently when I start typing the query (beyond "tabs"), it fails to search for anything. Link to comment
etling Posted January 8, 2015 Share Posted January 8, 2015 Realized I could have been more helpful in my previous post. Here's the output of the error log. I already updated the Adobe Unit Types.osax file and restarted my machine, but that did not help. Looks like maybe it's the system Ruby version in Yosemite that's doing it? I am not sure. [ERROR: alfred.workflow.input.scriptfilter] Code 1: /Users/will/Google Drive/Synced Settings/Alfred2/Alfred.alfredpreferences/workflows/user.workflow.85921167-2BF3-45F1-8D2C-9445EC8F2D4F/browser_tabs/applescript_utils.rb:30:in `block in osascript': AppleScript error: 2015-01-08 09:59:57.716 osascript[606:6233] ApplePersistence=NO (BrowserTabs::AppleScriptUtils::AppleScriptError) 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/will/Google Drive/Synced Settings/Alfred2/Alfred.alfredpreferences/workflows/user.workflow.85921167-2BF3-45F1-8D2C-9445EC8F2D4F/browser_tabs/applescript_utils.rb:25:in `osascript' from /Users/will/Google Drive/Synced Settings/Alfred2/Alfred.alfredpreferences/workflows/user.workflow.85921167-2BF3-45F1-8D2C-9445EC8F2D4F/browser_tabs/applescript_utils.rb:11:in `run' from /Users/will/Google Drive/Synced Settings/Alfred2/Alfred.alfredpreferences/workflows/user.workflow.85921167-2BF3-45F1-8D2C-9445EC8F2D4F/browser_tabs/commands/command.rb:42:in `run' from /Users/will/Google Drive/Synced Settings/Alfred2/Alfred.alfredpreferences/workflows/user.workflow.85921167-2BF3-45F1-8D2C-9445EC8F2D4F/browser_tabs.rb:51:in `run_command' from /Users/will/Google Drive/Synced Settings/Alfred2/Alfred.alfredpreferences/workflows/user.workflow.85921167-2BF3-45F1-8D2C-9445EC8F2D4F/browser_tabs.rb:24:in `tabs' from filter.rb:7:in `<main>' [ERROR: alfred.workflow.input.scriptfilter] Code 1: /Users/will/Google Drive/Synced Settings/Alfred2/Alfred.alfredpreferences/workflows/user.workflow.85921167-2BF3-45F1-8D2C-9445EC8F2D4F/browser_tabs/applescript_utils.rb:30:in `block in osascript': AppleScript error: 2015-01-08 09:59:57.955 osascript[609:6284] ApplePersistence=NO (BrowserTabs::AppleScriptUtils::AppleScriptError) 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/will/Google Drive/Synced Settings/Alfred2/Alfred.alfredpreferences/workflows/user.workflow.85921167-2BF3-45F1-8D2C-9445EC8F2D4F/browser_tabs/applescript_utils.rb:25:in `osascript' from /Users/will/Google Drive/Synced Settings/Alfred2/Alfred.alfredpreferences/workflows/user.workflow.85921167-2BF3-45F1-8D2C-9445EC8F2D4F/browser_tabs/applescript_utils.rb:11:in `run' from /Users/will/Google Drive/Synced Settings/Alfred2/Alfred.alfredpreferences/workflows/user.workflow.85921167-2BF3-45F1-8D2C-9445EC8F2D4F/browser_tabs/commands/command.rb:42:in `run' from /Users/will/Google Drive/Synced Settings/Alfred2/Alfred.alfredpreferences/workflows/user.workflow.85921167-2BF3-45F1-8D2C-9445EC8F2D4F/browser_tabs.rb:51:in `run_command' from /Users/will/Google Drive/Synced Settings/Alfred2/Alfred.alfredpreferences/workflows/user.workflow.85921167-2BF3-45F1-8D2C-9445EC8F2D4F/browser_tabs.rb:24:in `tabs' from filter.rb:7:in `<main>' [ERROR: alfred.workflow.input.scriptfilter] Code 1: /Users/will/Google Drive/Synced Settings/Alfred2/Alfred.alfredpreferences/workflows/user.workflow.85921167-2BF3-45F1-8D2C-9445EC8F2D4F/browser_tabs/applescript_utils.rb:30:in `block in osascript': AppleScript error: 2015-01-08 09:59:58.168 osascript[612:6297] ApplePersistence=NO (BrowserTabs::AppleScriptUtils::AppleScriptError) 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/will/Google Drive/Synced Settings/Alfred2/Alfred.alfredpreferences/workflows/user.workflow.85921167-2BF3-45F1-8D2C-9445EC8F2D4F/browser_tabs/applescript_utils.rb:25:in `osascript' from /Users/will/Google Drive/Synced Settings/Alfred2/Alfred.alfredpreferences/workflows/user.workflow.85921167-2BF3-45F1-8D2C-9445EC8F2D4F/browser_tabs/applescript_utils.rb:11:in `run' from /Users/will/Google Drive/Synced Settings/Alfred2/Alfred.alfredpreferences/workflows/user.workflow.85921167-2BF3-45F1-8D2C-9445EC8F2D4F/browser_tabs/commands/command.rb:42:in `run' from /Users/will/Google Drive/Synced Settings/Alfred2/Alfred.alfredpreferences/workflows/user.workflow.85921167-2BF3-45F1-8D2C-9445EC8F2D4F/browser_tabs.rb:51:in `run_command' from /Users/will/Google Drive/Synced Settings/Alfred2/Alfred.alfredpreferences/workflows/user.workflow.85921167-2BF3-45F1-8D2C-9445EC8F2D4F/browser_tabs.rb:24:in `tabs' from filter.rb:7:in `<main>' Link to comment
suan Posted January 18, 2015 Share Posted January 18, 2015 Would it be possible to search Firefox tabs as well? Link to comment
politicus Posted February 7, 2015 Share Posted February 7, 2015 @etling I have the same problem you mentionned. The only difference is the message I have in my console: [ERROR: alfred.workflow.input.scriptfilter] Code 1: Exited with error code but no message Link to comment
etling Posted February 19, 2015 Share Posted February 19, 2015 (edited) Well, I got desperate (did I mention that I REALLY LOVE this workflow?) and ended up writing my own version in AppleScript. It only works with Chrome, because that's all I really need it for, but I may try to add other browsers sometime in the future. A warning: this is my first foray in AppleScript and only my second workflow, so it probably is terrible and will crash and not work for you. You have been warned. Known bug! If you have a Google Search open in a tab, it will not show up in the filter results. I'm not sure if this is because Google is using some proprietary Chrome API which makes Google search tabs somehow different than regular webpages? But for the time being I have not found a way around this. I'll try to fix it soon. Since I usually use tab search for hopping between email, Toggl, Trello, github, etc, it doesn't really bug me too much yet. I was failing to clean/escape the url's being returned, hence the inability to scrape for tabs of Google Searches. I've fixed that and will upload a new version (which also works with Safari) momentarily. Much of this is based on this very helpful post, "Generate Feedback in Alfred 2 Workflows": http://www.johneday.com/617/generate-feedback-in-alfred-2-workflows Here's the workflow: http://static.etling.com/assets/SearchChromeTabs.alfredworkflow Edited February 27, 2015 by etling Link to comment
ClintonStrong Posted February 19, 2015 Author Share Posted February 19, 2015 Well, I got desperate (did I mention that I REALLY LOVE this workflow?) and ended up writing my own version in AppleScript. It only works with Chrome, because that's all I really need it for, but I may try to add other browsers sometime in the future. A warning: this is my first foray in AppleScript and only my second workflow, so it probably is terrible and will crash and not work for you. You have been warned. Known bug! If you have a Google Search open in a tab, it will not show up in the filter results. I'm not sure if this is because Google is using some proprietary Chrome API which makes Google search tabs somehow different than regular webpages? But for the time being I have not found a way around this. I'll try to fix it soon. Since I usually use tab search for hopping between email, Toggl, Trello, github, etc, it doesn't really bug me too much yet. Much of this is based on this very helpful post, "Generate Feedback in Alfred 2 Workflows": http://www.johneday.com/617/generate-feedback-in-alfred-2-workflows Here's the workflow: http://static.etling.com/assets/SearchChromeTabs.alfredworkflow I haven't had a whole lot of time to work on this workflow lately, but I'm glad you got something working. I've looked over the error reports, but there's nothing that really stands out to me. It's working fine on my system, which makes me think there might be something conflicting with it. I've considered making a new version which uses Safari/Chrome extensions to communicate with them via websockets (should also be faster than using AppleScript). I'll play around with that and report back if it works out. Link to comment
etling Posted February 19, 2015 Share Posted February 19, 2015 Hey Clinton - I'm sure you have better things to do! I tried to debug your original workflow, but eventually gave up. I do a bit of Ruby development and use rbenv, and I think the issue might be with the version of Ruby I'm running and how it implements the 'Open3' module (although maybe that is a symptom, not the cause). Actually, if you could tell me which ruby version you're using with the workflow, maybe I could try specifying that in rbenv, and see if it changes anything. If you decide to go the websockets/extensions route, or just tweak the existing version, I will gladly test the heck out of it. -W Link to comment
madvas Posted April 24, 2015 Share Posted April 24, 2015 This workflow is super useful! Just wanted to say thanks Link to comment
barn Posted May 19, 2015 Share Posted May 19, 2015 So I updated this to work with Yosemite and Google Chrome Beta, as it wasn't finding any tabs at all. Details are at https://github.com/barn/Search_Safari_and_Chrome_Tabs_alfred I've no idea if this works with system ruby, or with Safari (or even with non beta Chrome), but it's there on the off chance it's useful for someone else. Enjoy and good luck. Link to comment
politicus Posted June 13, 2015 Share Posted June 13, 2015 (edited) @etling Workflow's download link is dead @barn your workflow works pretty well. Thank you ! Edited June 13, 2015 by politicus Link to comment
boddicker Posted July 4, 2015 Share Posted July 4, 2015 Love it. It would be cool if there was a way to close multiple tabs in the same pass. A tab can be closed now by entering the keyword and pressing option, then enter. But, to close more tabs, Alfred has to be reactivated and the keyword entered once again. It would be sweet, perhaps impossible, if tabs could be added to the buffer with the option to close every tab in the buffer? Link to comment
cskeeters Posted May 24, 2016 Share Posted May 24, 2016 When I run this workflow, I got no results either. I got the same error message as user etling. browser_tabs/applescript_utils.rb:30:in `block in osascript': AppleScript error: 2015-01-08 09:59:57.716 osascript[606:6233] ApplePersistence=NO (BrowserTabs::AppleScriptUtils::AppleScriptError) This is caused by osascript outputting the string "AppleScript error: 2015-01-08 09:59:57.716 osascript[606:6233] ApplePersistence=NO" to stderr even when nothing has gone wrong. The workflow has a file named applescript_utils.rb in sub-folder browser_tabs. This file runs files or (in this case, source code passed in as a string) with the osascript program. This is done in the method osascript. In this method, the code reads from stderr and raises and exception unless the there was no output from stderr. The aforementioned string that osascript outputs causes an exception to be thrown. To correct the issue, I modified the method to check for exit status of the osascript process and only in that case raise an exception. The corrected script is available here: https://gist.github.com/cskeeters/fca453f00d51329546a781a1e36dbd18 Link to comment
M1m1s Posted June 11, 2016 Share Posted June 11, 2016 Great workflow! A problem though: When the tab selected in the workflow is opened, it does not gain focus. The result is, if I act on this tab (close it, for instance), I act instead on some invisible tab that is still in focus. Any solutions? Thanks! Link to comment
iJemz Posted June 6, 2017 Share Posted June 6, 2017 Great stuff for Tabaholics. Can you think of a way to get this to work as part of the Default search or fallback search results? Just trying to get one less hotkey to remember. 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