applescript error
Every time I run I get an error like this:
[2017-03-05 14:56:16][ERROR: action.applescript] { NSAppleScriptErrorBriefMessage = "Can\U2019t set backup of {""} to some object."; NSAppleScriptErrorMessage = "Can\U2019t set backup of {""} to some object."; NSAppleScriptErrorNumber = "-10006"; NSAppleScriptErrorRange = "NSRange: {532, 48}"; }
What if you open the package in Terminal and enter ./EnumWindows --search="Finder". What's the output?
Here is the output from that:
<items><item uid="1" arg="Path Finder|||||0|||||user.workflow.67156680-5A1E-44BC-9CF1-B8AFCFF1BFC5" autocomplete="user.workflow.67156680-5A1E-44BC-9CF1-B8AFCFF1BFC5"><title>user.workflow.67156680-5A1E-44BC-9CF1-B8AFCFF1BFC5</title><icon>/Applications/Path Finder.app/Contents/Resources/PathFinder.icns.icns</icon><subtitle>Process: Path Finder | App name: Path Finder</subtitle></item></items>
I'm sorry, my issue was very unclear. The workflow correctly lists my windows but I get the AppleScript error when I hit enter on one of them, and it does not become the focused window.
Do you have Alfred added to Accessibility settings?
yes:

What is the OS version and Alfred version?
10.12.3 & 3.3.1
That is weird. I have exactly the same OS version and Alfred version, and everything works for me...
Looks very similar to this one: https://github.com/ttscoff/Slogger/issues/140
http://krypted.com/lists/comprehensive-list-of-mac-os-x-error-codes/
Might be something security-related.
Found the error to be at line https://github.com/mandrigin/AlfredSwitchWindows/blob/master/AlfredWorkflow/info.plist#L129
Removing this will make the script work, even though the selected items isn't a safari tab