Alfred:AppleScript 中的工作流程 "Expected end of line" 错误
Alfred: Workflow "Expected end of line" error in AppleScript
我已经使用 Alfred. The workflow opens a bunch of applications. As a part of this workflow, I also want Stay 设置了一个工作流程,以将 window 个位置恢复到我创建的预设排列。
对于Stay,我使用"global"键盘命令Shift + ⌘ + Å恢复windows。此键盘快捷方式在应用程序的首选项中设置。
我在 Alfred 中创建了这个 NSAppleScript
:
on alfred_script(q)
delay 5
tell application "System Events"
keystroke "Å" using shift down, command down
end tell
activate application "Evernote"
end alfred_script
但是,我无法让它工作。根据 Alfred 工作流程调试,我收到了这些错误:
[ERROR: alfred.workflow.action.applescript] {
NSAppleScriptErrorBriefMessage = "Expected end of line but found \U201c,\U201d.";
NSAppleScriptErrorMessage = "Expected end of line but found \U201c,\U201d.";
NSAppleScriptErrorNumber = "-2741";
NSAppleScriptErrorRange = "NSRange: {92, 1}";
}
keystroke
/ key code
命令 using
> 1 修改键需要大括号:
keystroke "Å" using {shift down, command down}
我已经使用 Alfred. The workflow opens a bunch of applications. As a part of this workflow, I also want Stay 设置了一个工作流程,以将 window 个位置恢复到我创建的预设排列。
对于Stay,我使用"global"键盘命令Shift + ⌘ + Å恢复windows。此键盘快捷方式在应用程序的首选项中设置。
我在 Alfred 中创建了这个 NSAppleScript
:
on alfred_script(q)
delay 5
tell application "System Events"
keystroke "Å" using shift down, command down
end tell
activate application "Evernote"
end alfred_script
但是,我无法让它工作。根据 Alfred 工作流程调试,我收到了这些错误:
[ERROR: alfred.workflow.action.applescript] {
NSAppleScriptErrorBriefMessage = "Expected end of line but found \U201c,\U201d.";
NSAppleScriptErrorMessage = "Expected end of line but found \U201c,\U201d.";
NSAppleScriptErrorNumber = "-2741";
NSAppleScriptErrorRange = "NSRange: {92, 1}";
}
keystroke
/ key code
命令 using
> 1 修改键需要大括号:
keystroke "Å" using {shift down, command down}