Page 2 of 2 FirstFirst 12
Results 16 to 18 of 18
  1. #16
    DagothUr's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Posts
    403
    Reputation
    10
    Thanks
    31
    Ohk, I've stripped it down to its essentials:

    Code:
    #include <iostream> 
    #include <windows.h> 
    #include <time.h> 
    using namespace std; 
    int main()
    {
    	while(1)
    	{
    		if(GetAsyncKeyState(VK_LBUTTON))//for left mouse
    		{  
                                                  Sleep (1);
                                                  mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0); //Click Down
                                                  mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);   //Click Up
                                                  Sleep (1);
    		}
    	}
    }
    Now all I need is it to break without shutting down.

    Soooo... How do I stop the loop without closing the program by releasing the LMouse button?

  2. #17
    proud12's Avatar
    Join Date
    May 2011
    Gender
    male
    Posts
    11
    Reputation
    10
    Thanks
    0
    My Mood
    Mellow
    well if it works... u will release it?

  3. #18
    DagothUr's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Posts
    403
    Reputation
    10
    Thanks
    31
    Yeh, I shall. There is no point in keeping this for myself, its not realy a ********ker.

Page 2 of 2 FirstFirst 12