只是寻找一种简单/快速的方法来模拟UI自动化的设备抖动手势。我的脚本需要模拟摇动才能访问某些开发人员设置。
答案 0 :(得分:0)
为什么不直接调用你摇动时触发的功能(即你在tell application "Safari"
activate
tell (make new document) to set URL to "http://mxtoolbox.com/EmailHeaders.aspx"
delay 10
tell application "System Events"
set the clipboard to headerText
keystroke "v" using command down
tell application "Safari"
do JavaScript ("
document.getElementById('ctl00_ContentPlaceHolder1_txtToolInput').value='" & headerText as text) & "';
document.getElementById('ctl00_ContentPlaceHolder1_btnAction').click();
" in document 1
end tell
end tell
end tell
中调用的任何内容)?