我正在尝试在应用程序的不可编写脚本的区域中打开文件。
我通过使用 UI 脚本来选择正确的菜单项,但这会打开一个标准文件对话框。
如何使用 Applescript 设置文件对话框的目标位置?
啊,好吧,这应该会让你走上正确的道路
tell application "Safari"
activate
-- do menu select gui script first
set posixpath to "/path/to/a/folder/that/exists"
tell window 1
tell application "System Events"
keystroke "g" using {shift down, command down}
keystroke posixpath
delay 1
keystroke return
end tell
end tell
end tell
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)