我是寫一個簡單的代碼,點擊分享按鈕上說明廣告應用程式AppleScript的延遲這麼長時間運行後,單擊按鈕命令
set upArrow to ASCII character 30
activate application "Notes"
tell application "System Events"
tell process "Notes"
set frontmost to true
click button 2 of group 2 of splitter group of window 1
keystroke upArrow
keystroke return
end tell
end tell
問題是
click button 2 of group 2 of splitter group 1 of window 1 of application process "Notes" --> missing value
它需要6秒來完成運行這一點,返回錯誤缺失值
但如果我不添加按鍵或任何命令跟着,這個代碼工作完美
你在腳本編輯器中,或作爲小程序或運行呢? – 2013-03-16 07:20:12
我在applescript編輯器上運行它 – nemtabi 2013-03-16 07:23:07
http://i1092.photobucket.com/albums/i402/nemtabi/TinhTe/ScreenShot2013-03-16at22433PM.png – nemtabi 2013-03-16 07:27:27