Speed clicker help.

Discussion in 'Scar/Simba Help' started by Claximillions, Apr 13, 2011.

Speed clicker help.
  1. Unread #1 - Apr 13, 2011 at 3:10 PM
  2. Claximillions
    Joined:
    Mar 27, 2010
    Posts:
    166
    Referrals:
    0
    Sythe Gold:
    0

    Claximillions Active Member
    Banned

    Speed clicker help.

    Hey, I'm trying to make a script.
    This isn't for runescape, but it's gotten me confused beyond words.


    I'm trying to make a script that clicks fast when ever I have my left mouse button down.

    What code would I have to put in order for it to only go while left mouse button is down?

    I've tried a lot of things... Ask for my code if needed.
     
  3. Unread #2 - Apr 15, 2011 at 1:12 PM
  4. The Pocked Man
    Joined:
    Nov 14, 2009
    Posts:
    29
    Referrals:
    0
    Sythe Gold:
    0

    The Pocked Man Member

    Speed clicker help.

    There is a problem using the button you are pressing to activate the script and also being pressed by the script. It doesn't know the difference between a physical press and a script press and it messes with the logic.

    To get around this, use the Right mouse button to trigger a rapid fire on the Left mouse button.

    Don't set a target window in SCAR, and use Ctrl-Alt-R to start the script and Ctrl-Alt-S to stop it. When you want to rapid fire on the Left mouse button, click the Right mouse button ;)

    Code:
    program New;
    var
    x,y:Integer;
    begin
    While 1 <> 0 do //Infinite loop
     While IsMouseButtonDown(False) do
      begin
      GetMousePos(x,y);
      ClickMouse(x,y,True);
      Sleep(50);
      end;
    end.
     
  5. Unread #3 - Apr 15, 2011 at 4:21 PM
  6. Claximillions
    Joined:
    Mar 27, 2010
    Posts:
    166
    Referrals:
    0
    Sythe Gold:
    0

    Claximillions Active Member
    Banned

    Speed clicker help.

    Well this won't help, Because right click is a commonly used trigger for something else...
     
  7. Unread #4 - Apr 16, 2011 at 12:55 AM
  8. The Pocked Man
    Joined:
    Nov 14, 2009
    Posts:
    29
    Referrals:
    0
    Sythe Gold:
    0

    The Pocked Man Member

    Speed clicker help.

    this is where you tell me what IS free, what would be ok to use to trigger a rapid left click other than the left mouse button itself..

    any key on your keyboard can be used.

    Code:
    program New;
    var
    x,y:Integer;
    begin
    While 1 <> 0 do //Infinite loop
     While IsKeyDown(chr(32)) do //Space Bar
      begin
      GetMousePos(x,y);
      ClickMouse(x,y,True);
      Sleep(50);
      end;
    end.
    Other functions you could replace IsKeyDown and IsMouseButtonDown with
    You could also use a combination of key+mouse click to trigger it.
    The following uses CTRL+Left Click. You must hold down CTRL and click the mouse to trigger it, let go of CTRL when you want it to stop.
    You'll notice what I mean about the problem of the script not knowing the difference between your clicks and its own clicks.. The condition for it to keep clicking is that the CTRL button is held down AND the left mouse button is held down, but you can release the left mouse button while still holding CTRL and it will still happily click away, because its own scripted clicking is taking the place of you holding down the mouse button so the script still thinks the mouse button is down (but its not).

    Code:
    program New;
    var
    x,y:Integer;
    begin
    While 1 <> 0 do //Infinite loop
     While (IsFunctionKeyDown(1) and (IsMouseButtonDown(True))) do
      begin
      GetMousePos(x,y);
      ClickMouse(x,y,True);
      Sleep(20);
      end;
    end.
    Would be easier if I knew what this was for so I could understand what you want and what would best suit. If this is for some game that can use bindings, bind the fire button to the scrollwheel of your mouse ;)

    Enjoy.
     
  9. Unread #5 - Apr 16, 2011 at 3:35 PM
  10. Claximillions
    Joined:
    Mar 27, 2010
    Posts:
    166
    Referrals:
    0
    Sythe Gold:
    0

    Claximillions Active Member
    Banned

    Speed clicker help.

    Yes, I know any key can be used... I have used it as a key before, but I was trying to make it left mouse button as kind of a learning experience.
     
  11. Unread #6 - Apr 21, 2011 at 5:48 AM
  12. The Pocked Man
    Joined:
    Nov 14, 2009
    Posts:
    29
    Referrals:
    0
    Sythe Gold:
    0

    The Pocked Man Member

    Speed clicker help.

    Well you can't use the left mouse button to trigger it by holding it down.

    When you click the mouse, a MouseDown event is sent to a message handler, when you release the button a MouseUp event is sent.
    When the script does a ClickMouse it sends a MouseDown and then a MouseUp.

    So when you hold the button down, after a ClickMouse the computer thinks you've let go of the mouse button.

    A work around is to use the left mouse button to start the script, then the left mouse button again to stop it.

    Code:
    program New;
    var
    x,y:integer;
    begin
    While IsMouseButtonDown(True) do; //Clear any phantom clicks
    While 1 <> 0 do //Infinite loop
     begin
      If IsMouseButtonDown(True) then
       begin
        Repeat
         GetMousePos(x,y);
         ClickMouse(x,y,True);
         While IsMouseButtonDown(True) do; //Clear MouseDown event
         Sleep(20); //Adjust for speed of rapid fire clicking
        Until IsMouseButtonDown(True); //Check for second click
        Sleep(200); //Quick click to stop
       end;
     end;
    end.
    If this isn't to your satisfaction, go build a hardware rapid fire mouse.
     
< Findbitmap | Offering The Best Skim Dumps,Track1/2 Bank Login And Cc Only Hello brothers, Legit >

Users viewing this thread
1 guest


 
 
Adblock breaks this site