Results 1 to 6 of 6
  1. #1
    womb34's Avatar
    Join Date
    Dec 2013
    Gender
    male
    Posts
    1
    Reputation
    10
    Thanks
    0

    Mouse-Hook for Rapidfire-Script?

    So I am trying to code a rapidfire-script using a mouse hook to detect when the left mouse button has been pressed. The only problem is, when I send a click to the game (to fire the weapon) it gets detected via the mouse hook and so it results in an infinite loop. I don't want to use an additional hotkey (like H) in the game to fire the weapon because that requires input from the user (settings H to fire). I once saw a AHK/AutoIT script which does this, but I'm not familiar with this language.

    Code:
    *lbutton::
    Loop
    {
      GetKeyState, state, lbutton, P
      if State = U
        break
      Send, {lbutton}
      Sleep, 0.1
    }
    return
    I don't see what it does different. I guess my question comes down to: Is there a way to send a left mouse click to a process, without it getting detected by a Mousehook?

    // Edit: Oh btw, I am using GetAsyncKeyState(0x01) == -32768 to check if the left mouse button is pressed or not.
    Last edited by womb34; 02-18-2014 at 08:52 PM.

  2. #2
    rabir007's Avatar
    Join Date
    Aug 2011
    Gender
    male
    Location
    Behind you...
    Posts
    2,323
    Reputation
    148
    Thanks
    1,925
    My Mood
    Bored
    Code:
    if (MouseButtons == System.Windows.Forms.MouseButtons.Left)
                {
                    //SendKey
                }
    or use

    Code:
    etAsyncKeyState(0x01) < 0







  3. #3
    willy14's Avatar
    Join Date
    Feb 2014
    Gender
    male
    Posts
    469
    Reputation
    10
    Thanks
    82
    My Mood
    Inspired
    Use etAsyncKeyState(0x01) < 0

  4. #4
          ( ° ͜ʖ͡°)╭∩╮
    Former Staff
    MarkHC's Avatar
    Join Date
    Nov 2011
    Gender
    male
    Location
    127.0.0.1
    Posts
    2,750
    Reputation
    66
    Thanks
    14,529
    My Mood
    Angelic
    Quote Originally Posted by willy14 View Post
    Use etAsyncKeyState(0x01) < 0
    Why did you copy exactly what @rabir007said? Including the typo

    Also, the correct syntax is
    Code:
    if(GetAsynKeyState(0x1) & Int16.MaxValue != 0){
         //Do Shit Here
    }


    CoD Minion from 09/19/2012 to 01/10/2013

  5. #5
    willy14's Avatar
    Join Date
    Feb 2014
    Gender
    male
    Posts
    469
    Reputation
    10
    Thanks
    82
    My Mood
    Inspired
    Quote Originally Posted by -InSaNe- View Post

    Why did you copy exactly what @rabir007said? Including the typo

    Also, the correct syntax is
    Code:
    if(GetAsynKeyState(0x1) & Int16.MaxValue != 0){
         //Do Shit Here
    }

    No I didn't... I was trying to help.. Just drop it then

  6. #6
    SammyDoge1's Avatar
    Join Date
    Apr 2009
    Gender
    male
    Location
    Tried looking behind you...?
    Posts
    2,207
    Reputation
    62
    Thanks
    2,147
    My Mood
    Tired
    Use the above in a timer, and you are settled for success





Similar Threads

  1. [Request] Alien Swarm rapidfire script for Dual Pistols
    By Tigermisu in forum Hack Requests
    Replies: 4
    Last Post: 08-16-2010, 09:24 AM
  2. [Release] L96A1 mod ^^ for rapidfire !!!
    By wertoskiller in forum Combat Arms Europe Hacks
    Replies: 10
    Last Post: 01-18-2010, 12:51 AM
  3. im need bypass client hook for combat arms plz
    By puchas7 in forum Combat Arms Hacks & Cheats
    Replies: 11
    Last Post: 07-03-2009, 10:02 PM
  4. im need bypass client hook for combat arms plz
    By puchas7 in forum Combat Arms Europe Hacks
    Replies: 2
    Last Post: 03-09-2009, 04:30 AM
  5. looking for these scripts, will give m60codes for it!
    By BillGates in forum Trade Accounts/Keys/Items
    Replies: 3
    Last Post: 07-28-2007, 08:55 AM