if( GetAsyncKeyState(VK_UP) ) { }
if( GetAsyncKeyState(VK_DOWN) ) { }
if( GetAsyncKeyState(VK_RIGHT) ) { }
if( GetAsyncKeyState(VK_LEFT) ) { }
I can create a bot that can send basic keys such as alt,ctl,a,bc,etc. But I just can't send up/left/right/down arrow keys with my bot in game. Can someone please help me by giving me a full code for sending any arrow key? Thanks!
if( GetAsyncKeyState(VK_UP) ) { }
if( GetAsyncKeyState(VK_DOWN) ) { }
if( GetAsyncKeyState(VK_RIGHT) ) { }
if( GetAsyncKeyState(VK_LEFT) ) { }
No sorry that's not what I mention. I mention I need a code so that it can automatically send arrow keys
for ( ;; ) {
if( GetAsyncKeyState(VK_UP) ) { }
if( GetAsyncKeyState(VK_DOWN) ) { }
if( GetAsyncKeyState(VK_RIGHT) ) { }
if( GetAsyncKeyState(VK_LEFT) ) { }
}
No dude that's for hotkey I am trying to create a bot that will send arrow keys and I can not use post message
Um in c++
o.o ohhh
hmm google?
i think it ssomething like SendKeys("")
Sendkeys won't work I have to use sendinput
That's the issue I don't know how
Well google isn't helping ATM so that's why I'm asking
keyb_event(...)
Try This
look in to understand it well WinUser.h
how to use :Code:WINUSERAPI VOID WINAPI keybd_event( __in BYTE bVk, __in BYTE bScan, __in DWORD dwFlags, __in ULONG_PTR dwExtraInfo);
Code:keybd_event(TheKeyHere, 0, 0, 0);