Solved give me quickie on key events

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

SettiBoy

Newbie
Full Member
Aug 2, 2015
17
108
0
how the fuck do they work? only thing google gives me is some gay chat spambots and keydown.

but i need key up also to make p100 bhop on csgo!

so, is anyone willing to give me tips or share some saurce?



im :retard: btw
 

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,137
78,998
2,393

Kilo

Coder
Dank Tier Donator
Nobleman
Feb 4, 2015
98
4,028
1
Rake;41058 said:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms646260(v=vs.85).aspx
something like:
C++:
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
Sleep(10);
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
correct, that's one method. However as you can even see from msdn, it's an outdated method and to use SendInput instead.
https://msdn.microsoft.com/en-us/library/windows/desktop/ms646310(v=vs.85).aspx
Source example.
C++:
void leftClick()
{
	INPUT input = { 0 };
	input.type = INPUT_MOUSE;
	input.mi.dwFlags = MOUSEEVENTF_LEFTDOWN;
	SendInput(1, &input, sizeof(INPUT));
	SecureZeroMemory(&input, sizeof(INPUT));
	input.type = INPUT_MOUSE;
	input.mi.dwFlags = MOUSEEVENTF_LEFTUP;
	SendInput(1, &input, sizeof(INPUT));
}

You can also use the PostMessage to send messages to the queued thread.
https://msdn.microsoft.com/en-us/library/windows/desktop/ms644944(v=vs.85).aspx
Source example.
C++:
PostMessage(hwnd, WM_LBUTTONDOWN, 0, MAKELPARAM(x, y));
PostMessage(hwnd, WM_LBUTTONUP, 0, MAKELPARAM(x, y));
 
Last edited:

SettiBoy

Newbie
Full Member
Aug 2, 2015
17
108
0
correct, that's one method. However as you can even see from msdn, it's an outdated method and to use SendInput instead.
https://msdn.microsoft.com/en-us/library/windows/desktop/ms646310(v=vs.85).aspx
Source example.
C++:
void leftClick()
{
	INPUT input = { 0 };
	input.type = INPUT_MOUSE;
	input.mi.dwFlags = MOUSEEVENTF_LEFTDOWN;
	SendInput(1, &input, sizeof(INPUT));
	SecureZeroMemory(&input, sizeof(INPUT));
	input.type = INPUT_MOUSE;
	input.mi.dwFlags = MOUSEEVENTF_LEFTUP;
	SendInput(1, &input, sizeof(INPUT));
}

You can also use the PostMessage to send messages to the queued thread.
https://msdn.microsoft.com/en-us/library/windows/desktop/ms644944(v=vs.85).aspx
Source example.
C++:
PostMessage(hwnd, WM_LBUTTONDOWN, 0, MAKELPARAM(x, y));
PostMessage(hwnd, WM_LBUTTONUP, 0, MAKELPARAM(x, y));



if i may ask, turn that to keyboard thingy <3
 
Last edited by a moderator:

Kilo

Coder
Dank Tier Donator
Nobleman
Feb 4, 2015
98
4,028
1
if i may ask, turn that to keyboard thingy <3
You are absolutely kidding me right now... right?
I give you the msdn url to SendInput. Did you even take the time to read it?
I gave you example source to do what you will, it's not my job to change the content so you can copypasta, that is not what this site is about.
 

SettiBoy

Newbie
Full Member
Aug 2, 2015
17
108
0
You are absolutely kidding me right now... right?
I give you the msdn url to SendInput. Did you even take the time to read it?
I gave you example source to do what you will, it's not my job to change the content so you can copypasta, that is not what this site is about.
wow im better than u!!! gimme some h0t c+p ready stuf!!
 
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods