Results 1 to 6 of 6

Thread: A simple question

  1. #1
    Join Date
    Aug 2007
    Posts
    27
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default A simple question

    I'm rather new to SRL scripting but it's been pretty straightforward so far.

    I just have one question - i would like my mouse to stay at a certain co-ord and click after it has gone there via the SRL script Mouse.

    For example:

    SCAR Code:
    Mouse(618,405,5,5,True);

    I want the mouse to stay at the random co ordinates it has just clicked and then click again; what is the simplest way to do this?

    Thank you for your time.

  2. #2
    Join Date
    Oct 2006
    Posts
    412
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    The simplest way would to just do

    Mouse(618,405,5,5,True);

    again.

    so it would be

    Mouse(618,405,5,5,True);
    Mouse(618,405,5,5,True);

  3. #3
    Join Date
    Aug 2007
    Posts
    429
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    SCAR Code:
    Mouse(618,405,5,5,True);
    GetMousePos(x, y);
    Mouse(x, y, 0, 0, True);

  4. #4
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    Id have go to w/ Deker-

    SCAR Code:
    Mouse(618,405,5,5,True);
    GetMousePos(x, y);
    Mouse(x, y, 0, 0, True);

    Will click in a 5 pixel randomness at 618,405
    And the second click would click in the exact same spot like you wanted.
    This might bit a bit detectable, bit i could see somone clicking same spot once.
    You also might want a wait beacuse no one can click that fast

    SCAR Code:
    Mouse(618,405,5,5,True);
    Wait(200+Random(100));
    GetMousePos(x, y);
    Mouse(x, y, 0, 0, True);

  5. #5
    Join Date
    Aug 2007
    Posts
    27
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Cheers guys - this is exactly what i wanted.

    one more thing: if i am going to the mouse click on that point once and you say it's going to be suspect; the script will actually click on that same point about 50 times; how do you suggest i go about masking the fact that it isn't me clicking?

    In otherwords who do i insert micromovements or is there an SRL procedure for repatclicking.

    Thank you in advance.

  6. #6
    Join Date
    Aug 2007
    Posts
    429
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    You can use MouseBack

    SCAR Code:
    {*******************************************************************************
    procedure MouseBack(cx, cy, RanX, RanY, RandomEnd, PercentReturn, Click: Integer);
    By: phantombmx
    Description: Like MMouse or Mouse but will fall back on the starting point.
    RandomEnd is a random for the total ending point, 50 is good. PercentReturn is the
    percentage that it will fall back, 50-70 is good. 0 for no click, 1 for left, 2 for right.
    *******************************************************************************}


    procedure MouseBack(cx, cy, RanX, RanY, RandomEnd, PercentReturn, Click:
      Integer);
    var
      fx1, fx2, fy1, fy2: Integer;
      perc: Extended;
    begin
      perc := StrToFloat(IntToStr(PercentReturn)) / 100
        GetMousePos(fx1, fy1);
      case Click of
        0: MMouse(cx, cy, RanX, RanY);
        1: Mouse(cx, cy, RanX, RanY, True);
        2: Mouse(cx, cy, RanX, RanY, False);
      end;
      GetMousePos(fx2, fy2);
      if (Min(fx1, fx2) = fx1) then
        fx1 := fx2 - Trunc((fx2 - fx1) * (perc))
      else
        fx1 := fx1 + Trunc((fx1 - fx2) * (perc));
      if (Min(fy1, fy2) = fy1) then
        fy1 := fy2 - Trunc((fy2 - fy1) * (perc))
      else
        fy1 := fy1 + Trunc((fy1 - fy2) * (perc));
      case Random(2) of
        0: MMouse(fx1 - Random(RandomEnd), fy1 - Random(RandomEnd), 0, 0);
        1: MMouse(fx1, fy1, RandomEnd, RandomEnd);
      end;
    end;

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Simple Question...
    By Fr33d0ml4nc3 in forum OSR Help
    Replies: 4
    Last Post: 05-10-2008, 07:13 AM
  2. Just simple question.
    By zamserv in forum News and General
    Replies: 8
    Last Post: 05-03-2007, 05:30 AM

Posting Permissions

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