Questions tagged «javascript-automation»

1
从命令行打开并聚焦文件浏览对话框
我想从命令行打开本机文件浏览对话框,聚焦对话框,然后获取所选文件的完整路径。 以下代码可以很好地工作,但是该对话框没有聚焦,因此无法通过键盘进行控制: osascript -l JavaScript -e "var app = Application.currentApplication(); app.includeStandardAdditions = true; app.chooseFile().toString();" 谢谢你的帮助。,
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.