well keylogger isn't the name of my application. it's just a part of it. i just wanted to get certain keys as events. for opening or closing windows for example, override the runmode things like that. keylogger is just a well known word that describes the basics of the function. since a keylogger does about the same.
i want to disable my run thread as soon as i start moving my character and continue it once i stop moving my char. clicking something is no choice since it takes too long. that's one of the things i need it for. another one i wanted to do is to hide the control window and reopen it with a keystring and maybe a keycombo to stop the bot. i also thought about building a spell or ability queue with it.
I'm not sure i understand completely what your trying to do, however it sounds like you want to be able to hit an F-KEY like F1 and have it bring up a menu and/or start and stop your script/bot/program. if thats the case. There are a couple ways you could do it
1) Set up an event to Minimize and maximize on a key hit.
you can capture the Key press in .net and set it up on that.
or you can build your own system with timers. and have it check a state flag every 1 second.
well i tried to use a keyboard hook to capture certain keys and the duration they are pressed.
the menu is only one example. the more important one is to override the bot during moving for example. while i move the bot should do nothing.
the problem i have now is that hooks don't seem to work at all they work as soon as i don't use them in game, but refuse their work where i need them. if someone could explain me why i would be more than glad. capturing a key at .net is only possible with a hook or controls as far as i know (<-- might be wrong here, but i don't know another way ). since i want to capture them regardless if any window has a focus at all i thought hooks would be the way to go.