【发布时间】:2020-07-13 14:44:56
【问题描述】:
我想获取应用程序的properties(名称作为命令行参数给出)。基本上我想知道命令行参数中的application_name 是否位于最前面。
这就是我一直在做的(它对我有用)
tell application "Google Chrome"
get properties
end tell
但是当我尝试这样做时:
on run argv
tell application (item 1 of argv)
get properties
end tell
end run
使用命令osascript has_focus.scpt "Google Chrome" 执行时出现错误
environment/mac/scripts/has_focus.scpt:56:66:执行错误:Google Chrome 出现错误:无法获取所有属性。 (-1728)
请帮忙。
【问题讨论】:
标签: applescript