構建了一個applescript代碼後,我得到了這個錯誤。 error "Can’t get keystroke \"2\"." number -1728 from keystroke "2"
,我不知道它是什麼意思,或者如何解決它。我的代碼應該提出問題,打開粘貼,然後在框中鍵入返回的文本。我的代碼如下,直到第5行的keystroke a
。任何人都知道這個問題?這一直很煩人,現在我很感激任何幫助。涉及按鍵的AppleScript腳本錯誤
set a to text returned of (display dialog "What is your name?" with title "Yo name" with icon 2 default answer "" buttons {"Continue…"} default button 1 giving up after 25)
(...)
delay 1
tell application "Stickies" to activate
delay 1
keystroke a
keystroke space
(...)
謝謝......我給一個試試吧! – AHolasek
總是樂於幫忙,告訴我它是否有效:D – Lucasware
當你在這裏時,你如何在applescript中執行類似Command +的命令(帶按鍵) – AHolasek