Results 1 to 3 of 3

Thread: how do i repeat this action ?

  1. #1
    Join Date
    Jul 2015
    Posts
    1
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default how do i repeat this action ?

    program Test;
    {$I srl/srl.simba}
    var
    DTM_1:integer;
    begin
    MouseSPeed := 15;
    DTM_1 := DTMFromString('mGQAAAHicY2RgYMhgYmDwBtKuDg4MIMAIIg AXIwF9');


    ClickDTMRotatedIn(DTM_1, MMX1,MMY1, MMX2,MMY2, -Pi, Pi, Pi/30, [], mouse_Left);
    Wait(2500);
    while (IsMoving) do
    wait(100);

    FreeDTM(DTM_1);
    end.

    how i repeat this?? me noob and dont understand

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

    Default

    Something like this would work. Commented the explanation. Hope this helps.
    Simba Code:
    program Test;
    {$I srl/srl.simba}

    var
      DTM_1: integer;

    procedure ClickTheThing; //a procedure to click on the DTM.
    begin
      ClickDTMRotatedIn(DTM_1, MMX1, MMY1, MMX2, MMY2, - Pi, Pi, Pi / 30, [], mouse_Left);
      Wait(2500);
      while (IsMoving) do
        wait(100);
    end;

    procedure StopScript; //a procedure to stop the Free our DTM if the script is terminated. Only need to do this once per script.
    begin
      FreeDTM(DTM_1);
    end;

    begin
      MouseSPeed := 15; //First procedure to be processed in the script
      DTM_1 := DTMFromString('mGQAAAHicY2RgYMhgYmDwBtKuDg4MIMAIIg AXIwF9'); //Loads the DTM for use in ClickTheThing procedure.
      AddOnterminate(StopScript); //Tells the script to run the StopScript procedure when terminated or stopped for whatever reason.

      repeat //starts a repeating loop.
        ClickTheThing; //Tells the script to run the ClickTheThing procedure
      Until(false); //Checks to see if the repeat conditions have been met, and then repeats everything between the lines if it hasn't.
    end.

  3. #3
    Join Date
    Oct 2012
    Posts
    1,258
    Mentioned
    40 Post(s)
    Quoted
    588 Post(s)

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
  •