Results 1 to 7 of 7

Thread: How to Click a DTM Location

  1. #1
    Join Date
    Aug 2015
    Posts
    8
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default How to Click a DTM Location

    Hey guys, thanks for any help in advance.. im woundering how to make the script click on a DTM location... example..

    begin
    ClearDebug;
    Compost :=DTMFromString('mWAAAAHicY2FgYOhkZmCYAMRdQNwCxMsY IXgalM71NmaYXB7JUBbpwuCvL8aADhjRMAgAAAFUCL0=');

    If FindDTM(Compost, x, y, 0, 0 , 1040, 630) then
    begin
    What command has to be added here to make it click on the DTM it just found??

    end;



    Right after it finds the DTM compost... ( which it does find) how do i make it click on that location??

  2. #2
    Join Date
    Jan 2012
    Posts
    1,596
    Mentioned
    78 Post(s)
    Quoted
    826 Post(s)

    Default

    Simba Code:
    MoveMouse(x, y);  (or whatever move mouse you want)
    ClickMouse(x, y, MOUSE_LEFT); (not required if you use srl-6 or something which has clicking built into the mouse moving funcs)

  3. #3
    Join Date
    Jan 2012
    Location
    East Coast
    Posts
    733
    Mentioned
    81 Post(s)
    Quoted
    364 Post(s)

    Default

    Simba Code:
    procedure clickTheDTM;
    var
     x, y: integer;
    begin
      if FindDTM(Compost, x, y, 0, 0 , 1040, 630) then
      begin
        moveMouse(x, y);
        fastClick(MOUSE_LEFT);
      end;
    end;

  4. #4
    Join Date
    Aug 2015
    Posts
    8
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    hey guys, thank you for the fast responses!.. when i add MoveMouse(x , y); TO the script. it says that it Successfully executed the script.. but the mouse doesn't move =/

  5. #5
    Join Date
    Jan 2012
    Location
    East Coast
    Posts
    733
    Mentioned
    81 Post(s)
    Quoted
    364 Post(s)

    Default

    Quote Originally Posted by Buck42 View Post
    hey guys, thank you for the fast responses!.. when i add MoveMouse(x , y); TO the script. it says that it Successfully executed the script.. but the mouse doesn't move =/
    Post the entire script. Are you using SMART? There's a lot of variables here.

  6. #6
    Join Date
    Dec 2011
    Location
    East Coast, USA
    Posts
    4,231
    Mentioned
    112 Post(s)
    Quoted
    1869 Post(s)

    Default

    Quote Originally Posted by Buck42 View Post
    hey guys, thank you for the fast responses!.. when i add MoveMouse(x , y); TO the script. it says that it Successfully executed the script.. but the mouse doesn't move =/
    The DTM is not found, or you haven't selected a client, thus Simba has no idea where to move the mouse.
    GitLab projects | Simba 1.4 | Find me on IRC or Discord | ScapeRune scripts | Come play bot ScapeRune!

    <BenLand100> we're just in the transitional phase where society reclassifies guns as Badâ„¢ before everyone gets laser pistols

  7. #7
    Join Date
    Jan 2012
    Location
    Sydney, Australia
    Posts
    877
    Mentioned
    12 Post(s)
    Quoted
    368 Post(s)

    Default

    Try this to see if its finding the DTM

    Simba Code:
    procedure clickTheDTM;
    var
     x, y: integer;
    begin
      if FindDTM(Compost, x, y, 0, 0 , 1040, 630) then
      begin
        WriteLn('Found Coordinates');
        moveMouse(x, y);
        fastClick(MOUSE_LEFT);
      end else
      begin
        WriteLn('DTM Not Found');
      end;
    end;

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
  •