The closest solution to a continuous key press that I know is just repeating a key press a certain number of times:
repeat 1000 times tell application "System Events" to keystroke "c" using command down end repeat
But that's now what I'm trying to do. I need to simulate a continuos press, which means that it's like if the user keeps holding down the 'c' button for a certain amount of time. Is it possible to do that in AppleScript?
Edit I'm trying this way:
tell application "System Events" key down "c" delay 10 key up "c" end tell
Result: it keeps pressed "a" instead of "c". Why? I also have tried with the key code 8 (key down 8), with the same result.