How do you code keystroke enter?

i would like it to press down the enter key but…

keystroke “enter” - just types out the text

keystroke enter - thinks it’s a variable

how do I code it correctly?




tell application "System Events"
	
	keystroke "123"
	keystroke space
	keystroke return
-- enter is a problem --
	keystroke "enter"	
end tell


Hi,

enter is

key code 76

A free app called “Full Key Codes” is very useful for GUI scripting, and it’s free, too. :slight_smile: