keystroke in Jaguar

I can’t seem to get the “keystroke” command to work in Jaguar. Using the following simple script to test it…

tell application “TextEdit”
tell application “System Events”
tell process “TextEdit”
keystroke “m”
end tell
end tell
end tell

I get the following error:
“System Events got an error:

What am I missing here?

Did you “Enable access for assistive devices” in the “Universal Access” pref pane?

Actually, yea, I forgot to mention that I had done that. I’ve even restarted since that change just in case that would help, but no luck.

What is shown in the dialog if you run this script? If it isn’t 1.2 or greater, that’s the problem.

tell application "System Events" to version
display dialog result

Download System Events version 1.2 from Apple. Note that this is beta software which was made available to Jaguar users before Panther was released. Panther users should NOT install this software.

– Rob