Execute external macro/program (.exe) or type virtually a key

Hi there,

I'm new on arduino so i post my problem here. I need to execute a macro to "send" a key with windows api or autoit virtually.
So i would like to know if it's possible directly with arduino or if it's possible to execute an external program on the computer.

My project is to take joysticks axis's values, transfer their position into numbers and automatically type the arrow up, down, left or right. For example it could check up the posistion every 1 second.

So can you give me codes for arduino to type virtually a key or execute an external program? All ideas and suggests are welcomes!

Ps: Answer me asap it is for an exams!

Not sure what you are asking. The arduino can send serial data to a PC or the Arduino leonardo can look to the PC as if it were a keyboard.
Sensors or buttons can trigger sending data to the PC but that is it. You then need software on the PC to handle that data and take the action you want.

Often a program in the language Processing is used, as the language is free.

Executables on a windows machine are executed by the CPU that is built into the computer. You have to have something on the windows machine that recognises that something has been sent from the arduino. Whatever you put in place to do this, will then need to spawn out to the executable when appropriate.

Hi again,
I probably didn't explain what really is my project.

I'have an exam where i must do a présentation and an experience, for this expérience, I need to take a joystick and get the roll/pitch coordinates to convert them into actions like arrow up, arrow down left and right. I think my program can easily get the different coordinates but now i need to say to the computer "hey, type the left/up/down/right arrow key" , first i think to macro and executable programs which are easy to make but i didn't find anything in link with arduino. If you have any suggestions who can help me to type virtually a key, i want them. If you have informations to take coordinates, i'll take because i'm not sure that my program can run without bug.

I'm sorry for my english, if you have problems to understand me, i'll try to awnser quickly to say it differently or to give more informations. Precision, i have an arduino uno.

You can do this with HID. Leonardo can send the keystrokes to any "listening" program on iOS, Windows, or Linux. For example, you can use VBA to listen under Excel or Word or use Processing.

Or use a compiler to write a program, listen to your commands, and translate that as required... Such as run another program, etc.

Ray