【发布时间】:2023-03-07 20:31:01
【问题描述】:
我正在运行一个带有 applescript 的 automator,虽然它在 automator 内部工作,但从 xcode 运行时它会失败。 这是我的代码:
tell application "Xcode"
set targetProjectPath to path of active workspace document
set targetProjectPath to POSIX file (targetProjectPath & "/..") as string
set targetProjectPath to POSIX path of targetProjectPath
tell application "System Events"
tell process "Xcode"
click menu item "Save" of menu 0 of menu bar item "File" of menu bar 0
end tell
end tell
return {targetProjectPath}
end tell
我正在尝试触发保存并将活动工作区的路径返回给我以便稍后做一些工作。 几天前我才开始做,如果真的很愚蠢,请原谅我。
【问题讨论】:
标签: xcode macos xcode8 automator