Results 1 to 4 of 4

Thread: general scripting help

  1. #1
    Join Date
    Jan 2008
    Location
    england
    Posts
    232
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default general scripting help

    can someone please tell me how i can make scar do 2 actions at the same time such as moving the mouse forward and clicking (at the same time)

  2. #2
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    while (?) do
    ?

    Of course that wouldn't work for movemouse.

  3. #3
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    SCAR isn't capable of Multi Threading atm.

    So you cant do that

  4. #4
    Join Date
    Dec 2006
    Location
    SC
    Posts
    692
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    If you mean holding the mouse and dragging it, then here's an example:

    SCAR Code:
    program Example;

    {.include SRL\SRL.scar}

    var
      x, y: Integer; //to get Mouse Position after you move the mouse

    begin
      SetupSRL;

    //then somewhere in the script you want to drag the mouse
      HoldMouse(100, 200, true); //start holding mouse (left)
      Wait(10 + random(20)); //always have waits
      MMouse(500, 400, 3, 3); //move the mouse
      Wait(10 + random(20));
      GetMousePos(x, y); //get the mouse position (because MMouse has a little randomness)
      ReleaseMouse(x, y, true); //release mouse (left)
    //and the rest of the script
    end.

    Now, if you want to actually click while moving the mouse you'd have to set up something wherein the script clicks after it moves every "x" pixels.

    For example:
    SCAR Code:
    program Example;

    {.include SRL\SRL.scar}

    var
      x, y: Integer; //to store the original x/y coords
      i: Integer; //to count the loop

    begin
      SetupSRL;

    //then somewhere in the script you want to click while moving
      for i:= 0 to 100 do
      begin
        GetMousePos(x, y); //get mouse position
        Mouse(x + 2, y + 2, 0, 0, true); //move mouse two units from current position for x/y and click mouse (left)
        Wait(100 + random(200));
      end;
    //and the rest of the script
    end.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. General SCAR help!
    By jompa in forum News and General
    Replies: 4
    Last Post: 09-11-2008, 02:18 AM
  2. General FailSafes
    By Pyro in forum Outdated Tutorials
    Replies: 24
    Last Post: 07-05-2007, 01:48 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
  •