Sending a key sequence via Applescript

Hey guys, I’m a noob and I have a quick question.
I have this application Insomniax that I want to control in a script and it allows you to enable/disable its main feature via a hotkey. I read someplace that you could send a key sequence in a script, so could somebody tell me how to do that.
Thanks in advance

EDIT: i figured it would help if I told you what the hotkey was. I wanted something obscure so that I wouldn’t press it by accident so I chose alt + up arrow. Is there anyway to code that or should I choose something more common.

Hi,

try this


activate application "Insomniax"
tell application "System Events" to tell process "Insomniax" to key code 126 using option down