无法在 osascript 中执行点击
unable to perform click in osascript
我正在尝试使用此 osascript 模拟屏幕上的点击:
tell application "System Events"
click at {1500, 850} -- {from left, from top}
end tell
结果 System Events got an error: An error of type -25200 has occurred.
原来我点击了"off the screen"这里。如果你截图它说屏幕是 2900x1800,但是当你做 "screen capture select" (cmd+shift+4) 显然真正的最大值(屏幕右下角)是 1400x900 并且它需要 "relative" 数字.
我正在尝试使用此 osascript 模拟屏幕上的点击:
tell application "System Events"
click at {1500, 850} -- {from left, from top}
end tell
结果 System Events got an error: An error of type -25200 has occurred.
原来我点击了"off the screen"这里。如果你截图它说屏幕是 2900x1800,但是当你做 "screen capture select" (cmd+shift+4) 显然真正的最大值(屏幕右下角)是 1400x900 并且它需要 "relative" 数字.