SolvedRapidFire Script In C++

Posts 1–15 of 17 · Page 1 of 2
RapidFire Script In C++
I am able to make them
Code:
#include <iostream>
#include <Windows.h>
#include <time.h>

using namespace std;
int main()
{
	while(true)
	{
		if(GetAsyncKeyState(VK_LBUTTON)&0x8000)
		{
			mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 10, 0, 0);
			Sleep(60);
			mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);
			Sleep(20);
			
		}
	}
}
Is there any way I can get a separate left click function only affected by the mouse, because it seems these two cancel each other out >> mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0); and if(GetAsyncKeyState(VK_LBUTTON)&0x8000); >>

Btw, I cant use the mouse driver to change the leftclickbutton to something else and i need the script to output left clicks.. :P

i know this can be easily made with AHK and other macro programs, but i want to include this into a larger project..

I am sorry for possible typos, Norwegian speaking man here :P

Thanks in advance
Chang the code for lb=mm
dude change the mouse left to middle not left or right it will fail the code in building try "
Code:
c#=(vk_mmBUTTON) if LB=True then change RB= False{MM}
"

---------- Post added at 09:40 PM ---------- Previous post was at 09:39 PM ----------

basecally change the lb and rb to the mm
Quote Originally Posted by GhostMode1 View Post
dude change the mouse left to middle not left or right it will fail the code in building try "
Code:
c#=(vk_mmBUTTON) if LB=True then change RB= False{MM}
"

---------- Post added at 09:40 PM ---------- Previous post was at 09:39 PM ----------

basecally change the lb and rb to the mm
I am a bit confused, could you elaborate a bit?
Quote Originally Posted by funkake View Post
I am a bit confused, could you elaborate a bit?
What he means is that if the "left-button" triggers the bot and the bot then simulates "left-button" clicks the bot will after been activated once keep triggering itself in a infinite loop.
Try other windows api functions such as PostMessage and send it to the target application for mouse events.
Use vb for this
Quote Originally Posted by [P]tc View Post
Use vb for this
Can't, because I <3 C++
1) thats about the stupidest thing i have ever heard "Use VB for this"
2) What exactly are you trying to accomplish (Your code is valid)
3) Why do you want to trigger your event with a mouseclick when the mouse_event is the same button
Use a low level mouse hook to detect when the mouse button is pressed/released
Quote Originally Posted by Hell_Demon View Post
Use a low level mouse hook to detect when the mouse button is pressed/released
Yeah that sounds good, But that would be written in C i guess.. I'll look into it, thanks
Quote Originally Posted by Hell_Demon View Post
LowLevelMouseProc callback function

test flags for LLMHF_INJECTED to see if it was injected or not

If you get stuck on it let me know and I'll code up an example for you
Well, I have to admit I am stuck

I guess i need to make a Mousehook.dll

with this

Code:
LRESULT CALLBACK LowLevelMouseProc(
  __in  int nCode,
  __in  WPARAM wParam,
  __in  LPARAM lParam
);
but I haven't used these API functions before, so I am rubbing my head against the wall here






And diablo 3 came out Yey
Code:
 HHOOK hMouseHook;

somewhere in your initialization code:
hMouseHook = SetWindowsHookEx( WH_MOUSE_LL, &MouseProc, 0, GetCurrentThreadId());


LRESULT CALLBACK MouseProc(int nCode, WPARAM wParam, LPARAM lParam) 
{  
    if (nCode < 0)  // do not process the message 
        return CallNextHookEx(hMouseHook, nCode, wParam, lParam); 
    
    MSLLHOOKSTRUCT fuckingPenguins = (MSLLHOOKSTRUCT)lParam;
    if(!(fuckingPenguins.flags & LLMHF_INJECTED)) // not injected
    {
        if(wParam ==  WM_LBUTTONDOWN)
        {
            bRapidFire = true;
        }
        else if(wParam ==  WM_LBUTTONUP)
        {
            bRapidFire = false;
        }
    }
    
    return CallNextHookEx(hMouseHook, nCode, wParam, lParam); 
}

written in the browser so no idea if it works
It is, you can lock the thread.
Posts 1–15 of 17 · Page 1 of 2

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us