After building an applescript code, I got this error. error "Can’t get keystroke \"2\"." number -1728 from keystroke "2" and I don't know what it means, or how to fix it. My code is supposed to ask the question, open stickies, and then type the returned text into the box. My code below works until keystroke a on line 5. Anyone know the problem? This has been annoying me so long now, and I would appreciate any help.
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
(...)