Results 1 to 8 of 8

Thread: Clickmouse2 looks like a banhammer.

  1. #1
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default Clickmouse2 looks like a banhammer.

    in my script I use

    Simba Code:
    MMouse(RandomRange(X - 4, X + 4), RandomRange(y - 4, y + 4), 0, 0);

    To randomize were the mouse mines, but it seems that clickmouse2 moves the mouse after the mouse is already hovered over the rock. That is pretty fishy what is the mouse click that clicks the current position?

  2. #2
    Join Date
    Mar 2006
    Location
    Belgium
    Posts
    3,564
    Mentioned
    111 Post(s)
    Quoted
    1475 Post(s)

    Default

    Try this?

    Simba Code:
    {*******************************************************************************
    procedure FastClick(button: Integer);
    By: Flight
    Description: Quickly click the mouse.
    *******************************************************************************}

    procedure FastClick(button: variant);
    var
      x, y: integer;
      ibutton: Integer;
    begin
      if VariantIsBoolean(button) then
      begin
        if (button) then
          iButton := mouse_left
        else
          iButton := mouse_right;
      end else
        iButton := button;

      if (iButton = mouse_move) then Exit;
      GetMousePos(x, y);
      HoldMouse(x, y, iButton);

      Wait(RandomRange(60, 150));

      GetMousePos(x, y);
      ReleaseMouse(x, y, iButton);
    end;

    Creds to DannyRS for this wonderful sig!

  3. #3
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Quote Originally Posted by Sjoekeloe View Post
    Try this?

    Simba Code:
    {*******************************************************************************
    procedure FastClick(button: Integer);
    By: Flight
    Description: Quickly click the mouse.
    *******************************************************************************}

    procedure FastClick(button: variant);
    var
      x, y: integer;
      ibutton: Integer;
    begin
      if VariantIsBoolean(button) then
      begin
        if (button) then
          iButton := mouse_left
        else
          iButton := mouse_right;
      end else
        iButton := button;

      if (iButton = mouse_move) then Exit;
      GetMousePos(x, y);
      HoldMouse(x, y, iButton);

      Wait(RandomRange(60, 150));

      GetMousePos(x, y);
      ReleaseMouse(x, y, iButton);
    end;
    whats the command to click?

  4. #4
    Join Date
    Mar 2006
    Location
    Belgium
    Posts
    3,564
    Mentioned
    111 Post(s)
    Quoted
    1475 Post(s)

    Default

    fastclick(true) is left click
    fastclick(false) right

    Creds to DannyRS for this wonderful sig!

  5. #5
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    One more queston I get a memory error when I run this:

    Simba Code:
    program new;
    {$i srl/srl.simba}
    const
      TOL = 1;
      ONE = 6119777;    // each word is 40 14846307


    var
      CountOne: Integer;

    begin
      MouseSpeed := 15;
      //ClearDebug;
      //SetupSRL;
      CountOne := CountColorTolerance(ONE, 214, 216, 241, 243, TOL);

      Writeln('There are ' + IntToStr(CountOne) + ' Pixels that are ' + IntToStr(ONE) + ' color');

    end.

    Code:
    Error: Exception: Out of memory at line 15

  6. #6
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    nvmf ixed

  7. #7
    Join Date
    Jan 2012
    Posts
    2,568
    Mentioned
    35 Post(s)
    Quoted
    356 Post(s)

    Default

    Quote Originally Posted by rjj95 View Post
    in my script I use

    Simba Code:
    MMouse(RandomRange(X - 4, X + 4), RandomRange(y - 4, y + 4), 0, 0);

    To randomize were the mouse mines, but it seems that clickmouse2 moves the mouse after the mouse is already hovered over the rock. That is pretty fishy what is the mouse click that clicks the current position?
    ClickMouse2() does not alter your current mouse pos.

    You were probably already hovering over the object when the uptext check is done (if you use SRL obj finding such as FindObjxxxx() etc), and it moved again since you called MMouse().

  8. #8
    Join Date
    Sep 2007
    Location
    Australia, NSW
    Posts
    934
    Mentioned
    6 Post(s)
    Quoted
    145 Post(s)

    Default

    Quote Originally Posted by riwu View Post
    ClickMouse2() does not alter your current mouse pos.

    You were probably already hovering over the object when the uptext check is done (if you use SRL obj finding such as FindObjxxxx() etc), and it moved again since you called MMouse().
    +1,

    ClickMouse2() does not alter mouse position - it just clicks.
    Simba Code:
    (*
    ClickMouse2
    ~~~~~~~~~~~

    .. code-block:: pascal

        procedure ClickMouse2(button: variant);

    Clicks the mouse in a human way on the current mouse spot.

    .. note::

        by SRL Community

    Example:

    .. code-block:: pascal

    *)

    procedure ClickMouse2(button: variant);
    var
      a,b,c : integer;
      iButton: Integer;
    begin
      { Eventually, should be made to just use Integers }
      if VariantIsBoolean(button) then
      begin
        if (button) then
          iButton := mouse_left
        else
          iButton := mouse_right;
      end else
        iButton := button;
     
      if (iButton = mouse_move) then Exit; { we aren't actually clicking! }

      GetMousePos(b, c);

      HoldMouse(b, c, iButton);
      repeat
        Wait(20 + Random(30));
        a := a + 1;
      until (a > 4);
      GetMousePos(b, c);
      ReleaseMouse(b, c, iButton);
      Wait(50+Random(50));
    end;

    INACTIVE
    How-to: Make S.M.A.R.T. less laggy

    Sell me your Maple Shieldbows (u)! Up to 95gp ea!

    My Scripts:
    Ivy Chopper Ultra [RS3] | Fantastic Fletcher [RS3]
    99 x78 | 99 x10 | 99 x2 | 99 x12


    Use the REPORT tags when posting progress reports to make life easier (:
    [REPORT]Put progress report in here![/REPORT]

    Super Savvy Smither V1.06Cool Classy Cooker V1.02 [EoC]

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •