AlfredSwitchWindows icon indicating copy to clipboard operation
AlfredSwitchWindows copied to clipboard

applescript error

Open mgroth0 opened this issue 8 years ago • 11 comments

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}"; }

mgroth0 avatar Mar 05 '17 19:03 mgroth0

What if you open the package in Terminal and enter ./EnumWindows --search="Finder". What's the output?

mandrigin avatar Mar 06 '17 13:03 mandrigin

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.

mgroth0 avatar Mar 06 '17 23:03 mgroth0

Do you have Alfred added to Accessibility settings?

mandrigin avatar Mar 07 '17 18:03 mandrigin

yes: image

mgroth0 avatar Mar 10 '17 01:03 mgroth0

What is the OS version and Alfred version?

mandrigin avatar Mar 12 '17 12:03 mandrigin

10.12.3 & 3.3.1

mgroth0 avatar Mar 13 '17 16:03 mgroth0

That is weird. I have exactly the same OS version and Alfred version, and everything works for me...

mandrigin avatar Mar 20 '17 10:03 mandrigin

Looks very similar to this one: https://github.com/ttscoff/Slogger/issues/140

mandrigin avatar Mar 20 '17 10:03 mandrigin

http://krypted.com/lists/comprehensive-list-of-mac-os-x-error-codes/

mandrigin avatar Mar 20 '17 10:03 mandrigin

Might be something security-related.

mandrigin avatar Mar 20 '17 10:03 mandrigin

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

emilingerslev avatar Aug 09 '17 08:08 emilingerslev