【发布时间】:2013-04-05 22:56:41
【问题描述】:
如何使用 AppleScript 控制点击?
这个脚本应该可以工作,但它没有
activate application "Finder"
tell application "System Events"
tell process "Finder"
key down control
delay 1
click at {600, 600} -- {from left, from top}
delay 1
key up control
end tell
end tell
MouseTools 有时不可靠。我知道 cliclick - 还没有尝试过。
我更喜欢仅 AS 的解决方法,但欢迎提出任何建议。
【问题讨论】:
-
我假设您正在尝试在 finder 中打开特定文件或文件夹的上下文菜单。打开该菜单后,您打算单击哪个菜单项?
-
@AtomicToothbrush 一旦CM打开,我就
keystroke "My Command" & return
标签: macos user-interface user-controls applescript controls