Results 1 to 10 of 10

Thread: first script help

  1. #1
    Join Date
    Sep 2008
    Posts
    45
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default first script help

    i found a tutorial showing me how to find and click a clolour, but when i click run i get this:
    Line 11: [Error] (16034:1): Semicolon (';') expected in script

    the script is
    program New;
    {.include SRL\SRL.scar}
    var
    X, Y: Integer;
    begin;
    if(FindColorSpiralTolerance(x, y, 12153972, 0, 0, 600, 300, 5))then //The 5 is tolerance
    begin
    Mouse(x, y, 0, 0, true);
    end

    begin;-----------here is the line with the error messsage
    end.

    can someone please help...

  2. #2
    Join Date
    May 2007
    Location
    England
    Posts
    4,140
    Mentioned
    11 Post(s)
    Quoted
    266 Post(s)

    Default

    Try this:

    SCAR Code:
    program New;
    {.include SRL\SRL.scar}

    var
      X, Y: Integer;

    begin
      if (FindColorSpiralTolerance(x, y, 12153972, 0, 0, 600, 300, 5)) then
        begin
          Mouse(x, y, 0, 0, true);
        end;
    end.
    <3

    Quote Originally Posted by Eminem
    I don't care if you're black, white, straight, bisexual, gay, lesbian, short, tall, fat, skinny, rich or poor. If you're nice to me, I'll be nice to you. Simple as that.

  3. #3
    Join Date
    Jul 2008
    Posts
    179
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    you dont put semicolon's after begins

  4. #4
    Join Date
    Sep 2008
    Posts
    45
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by R1ch4 View Post
    Try this:

    SCAR Code:
    program New;
    {.include SRL\SRL.scar}

    var
      X, Y: Integer;

    begin
      if (FindColorSpiralTolerance(x, y, 12153972, 0, 0, 600, 300, 5)) then
        begin
          Mouse(x, y, 0, 0, true);
        end;
    end.
    the mouse moves slowly how can i make it move at human speed??

  5. #5
    Join Date
    May 2007
    Location
    England
    Posts
    4,140
    Mentioned
    11 Post(s)
    Quoted
    266 Post(s)

    Default

    Use MouseSpeed:

    SCAR Code:
    program New;
    {.include SRL\SRL.scar}
     
    var
      X, Y: Integer;
     
    begin
      MouseSpeed:= 20;
      if (FindColorSpiralTolerance(x, y, 12153972, 0, 0, 600, 300, 5)) then
        begin
          Mouse(x, y, 0, 0, true);
        end;
    end.

    You can change MouseSpeed to how fast you want it to move.
    <3

    Quote Originally Posted by Eminem
    I don't care if you're black, white, straight, bisexual, gay, lesbian, short, tall, fat, skinny, rich or poor. If you're nice to me, I'll be nice to you. Simple as that.

  6. #6
    Join Date
    Sep 2008
    Posts
    45
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thanks this works great

  7. #7
    Join Date
    May 2007
    Location
    England
    Posts
    4,140
    Mentioned
    11 Post(s)
    Quoted
    266 Post(s)

    Default

    No problem, just ask if you need anymore help.
    <3

    Quote Originally Posted by Eminem
    I don't care if you're black, white, straight, bisexual, gay, lesbian, short, tall, fat, skinny, rich or poor. If you're nice to me, I'll be nice to you. Simple as that.

  8. #8
    Join Date
    Sep 2008
    Posts
    45
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    hey iv managed to put together a test powerchopper-

    program New;
    {.include SRL\SRL.scar}

    var
    X, Y: Integer;

    begin
    MouseSpeed:= 20;
    if (FindColorSpiralTolerance(x, y,3626055, 0, 0, 600, 300, 5)) then
    begin
    Mouse(x, y, 0, 0, true);
    end else
    writeln('not found')
    end.
    end.
    then
    wait(200)
    if (FindColorSpiralTolerance(x, y,1852749, 0, 0, 600, 300, 5)) then
    begin
    Mouse(x, y, 0, 0, true);
    end else
    writeln('not found')
    end;
    end.

    only problem is it only gets to the first click comand and doesnt do the other whats rong with it??

  9. #9
    Join Date
    Nov 2007
    Location
    Chile
    Posts
    1,901
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You are ending the script before searching the second time. Remove the ends. and put them at last.


  10. #10
    Join Date
    May 2007
    Location
    England
    Posts
    4,140
    Mentioned
    11 Post(s)
    Quoted
    266 Post(s)

    Default

    Well from a first glance, that script shouldn't compile, as you've got an "end." instead of "end;" in the middle of a script. So try this:

    SCAR Code:
    program New;
    {.include SRL\SRL.scar}

    var
      X, Y: Integer;

    begin
      MouseSpeed:= 20;
      if (FindColorSpiralTolerance(x, y,3626055, 0, 0, 600, 300, 5)) then
        begin
          Mouse(x, y, 5, 5, True); //ALWAYS have randomness
        end else
        begin  
          WriteLn('Not Found');
          Wait(200 + Random(150))//Randomness
            if (FindColorSpiralTolerance(x, y,1852749, 0, 0, 600, 300, 5)) then
              begin
                Mouse(x, y, 5, 5, true);
              end else
                WriteLn('Not Found')
           end;
    end.

    I think that should run.
    <3

    Quote Originally Posted by Eminem
    I don't care if you're black, white, straight, bisexual, gay, lesbian, short, tall, fat, skinny, rich or poor. If you're nice to me, I'll be nice to you. Simple as that.

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
  •