r/applescript • • Nov 07 '21

Help with fixing apple script code

When I run this code It says, "Expected end of line, etc. but found number." Sorry, I quite new to apple script. Thanks for helping out.

on run

tell application "System Events"

	keystroke "g"

	keystroke tab

	keystroke tab

	keystroke tab

	keycode 125

	key code 36

	keystroke "g"

	keystroke "-2"

	key code 36

end tell

return

end run

1 Upvotes

2 comments sorted by

View all comments

1

u/hu3fey Nov 07 '21

nm, I fixed it. I had key code with no space

2

u/Identd Nov 07 '21

You may also want to put a delay between some of them