just getting started: sending keystrokes

Hello, I am a newbie to applescripting, and am willing to learn.

Just to get me started, i wanted to know how to send keystrokes (perhaps in a loop) to a game i have (ghost recon). I would like to just press (F9) and then it would send the keystroke “w” which is move-forward in the game. then upon hitting (F9) again, or someother hotkey, the loop will break. can anyone start me off? any help or direction is appreciated. Thanks

Welcome. Sorry to say that games are notoriously unscriptable and AppleScript can’t do what you want without outside help. Not a good place to start.

Thanks for the tip. I would have spent days trying… Where is a good place to start? Other scripting languages? Perl? Thanks