Results 1 to 4 of 4

Thread: None of my mousecommands work?

  1. #1
    Join Date
    Dec 2011
    Posts
    29
    Mentioned
    0 Post(s)
    Quoted
    12 Post(s)

    Default None of my mousecommands work?

    Well. I have tried these methods:

    Code:
                HoldMouse(x, y, 1);
                Wait(800+random(10));
                ReleaseMouse(x, y, 1);
    Code:
    clickmouse2(mouse_Right);
              Wait(500+random(50));
              P07_ChooseOptionMulti(['']);
    Code:
    Mouse(x, y, 4, 4, True);
    My problem being... They won't click. They just hover over where they are supposed to click.

    My latest "script"

    Code:
    program Fisher;
    {$I SRL/SRL.Simba}
    {$I P07Include.Simba}
    
    Procedure P07_DeclarePlayer;
    begin
      P07_PlayerName:='user';
      P07_PlayerPass:='pw';
    end;
    
    Procedure Fish;
    var x, y: integer;
    begin
      repeat
      if P07_FindObj(x, y,'ishing',15518109, 5) then
          begin
                HoldMouse(x, y, 1);
                Wait(800+random(10));
                ReleaseMouse(x, y, 1);
          end;
          repeat
          Wait(5000+random(500));
          Until not (P07_InvFull);
      until(P07_InvFull);
    end;
    begin
    SetupP07Include;
      ActivateClient;
      P07_DeclarePlayer;
      if (Not P07_LoggedIn) Then
        P07_LogInPlayer;
      Fish;
    end.
    What am I doing wrong?

  2. #2
    Join Date
    Jul 2012
    Posts
    437
    Mentioned
    10 Post(s)
    Quoted
    165 Post(s)

    Default

    Code:
           
     
      if P07_FindObj(x, y,'ishing',15518109, 5) then
          begin
                WriteLn('found object');
                HoldMouse(x, y, 1);
                Wait(800+random(10));
                ReleaseMouse(x, y, 1);
          end;
    Try something like above to make sure the FindObj is returning true.

  3. #3
    Join Date
    Feb 2012
    Location
    Wonderland
    Posts
    1,988
    Mentioned
    41 Post(s)
    Quoted
    272 Post(s)

    Default

    While I don't have time to explain fully the practices that I'd suggest be changed, you'll/I'd recommend that you:
    1. want to make sure the find obj function actually finds what you are looking for, and
    2. MMouse(x, y, 0, 0); GetMousePos(x, y); -- calling these two methods before the holdMouse call.

  4. #4
    Join Date
    Dec 2011
    Posts
    29
    Mentioned
    0 Post(s)
    Quoted
    12 Post(s)

    Default

    Thanks to both of you.

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
  •