2015-04-23 53 views
0

我試圖填補一個文本框,但不能AppleScript的填寫文本框

activate application "****" 
tell application "System Events" 
    tell process "****" 
     tell text field 1 of window 1 
      set value of text field 1 to "here is the text" 
     end tell 
    end tell 
end tell 
+0

我實際上儘快修復窗口的3 \t \t點擊文本字段1 \t \t延遲3 \t \t按鍵「***」,但它並不總是工作 –

+0

第二'文本字段1'的太許多。它只是'設置值爲'這裏是文本'' – user309603

+0

實際上通過這個腳本,但它沒有填寫實際文本fieldactivate應用程序「****」 告訴應用程序「系統事件」 \t告訴過程「* **」 \t \t延遲1 \t \t選擇文本字段窗1的1個 \t \t設定值到 「****」 \t \t延遲2 \t端告訴 端告訴 –

回答

1
activate application "****" 
tell application "System Events" 
    tell process "****" 
     set value of text field 1 of window 1 to "here is the text" 
    end tell 
end tell 

,如果你想嘗試這對我的作品。