OK... I have a program that runs and sends output to a game window. It is a magic roleplaying game online. I am using getpixel to look for when my energy is down and then I send a double click to my healing potions. All is well and working.
This program runs as AC2.exe in the process list however it runs in an infinite loop which is fine and what I want. What I want though is if a hotkey is pressed on the keyboard while playing the game it will completely terminate the program, and when another hotkey is pressed it will turn on the program.
So what I am figuring is I will code a seperate program which runs invisible and listens for hotkeys. When for example key "c" is presssed it will taskkill AC2.exe which is my autocure program, and then when for example "v" is pressed. It will then run AC2.exe.
To be simple. I will have my users keep both programs in the same folder, in which the program they run is simply the on\off program for AC2.exe.
What is the simplest way to do this?
psudeo
press a key, AC2.exe terminates, press another key AC2.exe gets executed.
I wish this program to be visible so this will be using some basic windows programming.
Code examples would be greatly appreciated I have been searching online allot and gathering bits and peices, but nothing clear and solid so I figured I would just outright ask for someones help to produce actual code, or GIVE me the wheel so to speak. In which I will learn allot from in due time.
Thank you,
Cody Oebel