Results 1 to 9 of 9

Thread: New to scar

  1. #1
    Join Date
    Aug 2006
    Posts
    35
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default New to scar

    hi, im new to scar, have scripted for about 1 year but i dont understand the code, i tried to make my own script, its supposed to move the mouse tp the certain color i included, then wait, but i have errors, can some one tell me whats rong with my code, and how to move a mouse from one part of the screen, then click on a color, ty

    program Test;
    {.include SRL/SRL.scar}
    begin
    repeat
    if (FindColorSpiral(x,y,3902183,976,488,488,976)) then
    wait(200000)
    end.
    h):

  2. #2
    Join Date
    Oct 2006
    Location
    finland, helsinki
    Posts
    2,501
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    dunno if u mean like this:

    SCAR Code:
    program Test;
    {.include SRL/SRL.scar}

    begin
      SetupSRL;
        repeat
          if (FindColorSpiral(x,y,3902183,976,488,488,976)) then
            MMouse(x,y,5,5)
          wait(200000)
        Until(false)//??
    end.

    Code:
    • Narcle: I recall Jukka releasing a bunch of scripts like this before... Its how he rolls I think. rofl
    • Solarwind: Dude, you are like... t3h s3x.
    • Hy71194: JuKKa you're a machine! You released 3 scripts in 10 minutes! :O
    • benjaa: woah.... Jukka is the man Guildminer pwns all
    • NaumanAkhlaQ: And JuKKa Is my Her0!

  3. #3
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    SCAR Code:
    program Test;
    {.include SRL/SRL.scar}
     
    begin
      SetupSRL;
        repeat
          if (FindColortolerance(x,y,3902183,MSX1, MSY1, MSX2, MSY2,5)) then
            Mouse(x,y,2,2,true)
          wait(200000)
        Until(false)//??
    end.

    cept why do u want to wait 2 minutes..?
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


  4. #4
    Join Date
    Feb 2007
    Posts
    66
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    program Test;
    {.include SRL/SRL.scar}
     
    begin
    SetupSRL;
      repeat
        if (FindColortolerance(x,y,3902183,MSX1, MSY1, MSX2, MSY2,5)) then
        begin        
          Mouse(x,y,2,2,true);
          //wait(200000); that your wait, its about 3 mins
          wait(1 * 1000 * 60) // 1 min wait, easier to understand when written like that
        end;
      Until(false)
    end.

    You have 2 thing under your if statement.
    So you need to begin it and end it.

  5. #5
    Join Date
    Jan 2007
    Location
    Skaville, Jamaica
    Posts
    1,117
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by aspolokmon View Post
    hi, im new to scar, have scripted for about 1 year but i dont understand the code, i tried to make my own script, its supposed to move the mouse tp the certain color i included, then wait, but i have errors, can some one tell me whats rong with my code, and how to move a mouse from one part of the screen, then click on a color, ty

    program Test;
    {.include SRL/SRL.scar}
    begin
    repeat
    if (FindColorSpiral(x,y,3902183,976,488,488,976)) then
    wait(200000)
    end.
    h):
    Ohh, you're are just looking for the color, but then don't tell SCAR whether or not to click.

    You have to add MMouse(x, y, rx, ry); then Mouse(x, y, rx, ry, true);

  6. #6
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    no...if ur gonna use Mouse...then u only use mouse no mmouse
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


  7. #7
    Join Date
    Aug 2006
    Posts
    35
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thanks guys for ur help, its real confusing for me, i try to edit some things then it stuffs up for me, ive taken what u said and tried to then make it move to a different place, heres the code, plz tell me whats wrong

    program Test;
    {.include SRL/SRL.scar}

    begin
    SetupSRL;
    repeat
    if (FindColortolerance(x,y,24800,MSX1, MSY1, MSX2, MSY2,5)) then
    begin
    Mouse(x,y,2,2,true); then
    (FindColortolerance(x,y,24800,MSX1, MSY1, MSX2, MSY2,5);
    wait(1 * 1000 * 60)
    end;
    Until(false)
    end.

  8. #8
    Join Date
    Feb 2007
    Location
    USA
    Posts
    667
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    "then"s always need to go with an if. You just had one floating.

    SCAR Code:
    program Test;
    {.include SRL/SRL.scar}

    begin
    SetupSRL;
    repeat
      if (FindColortolerance(x,y,24800,MSX1, MSY1, MSX2, MSY2,5)) then
      begin
        Mouse(x,y,2,2,true);
        if (FindColortolerance(x,y,24800,MSX1, MSY1, MSX2, MSY2,5)) then
          wait(1 * 1000 * 60)
      end;
    Until(false)
    end.

  9. #9
    Join Date
    Mar 2007
    Posts
    3,681
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by dan cardin View Post
    SCAR Code:
    program Test;
    {.include SRL/SRL.scar}
     
    begin
      SetupSRL;
        repeat
          if (FindColortolerance(x,y,3902183,MSX1, MSY1, MSX2, MSY2,5)) then
            Mouse(x,y,2,2,true)
          wait(200000)
        Until(false)//??
    end.

    cept why do u want to wait 2 minutes..?
    thats not two minutes...

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 15
    Last Post: 09-22-2008, 12:32 PM
  2. SCAR Divi 3.01 DONT associate .scar files!!!
    By chimpy in forum News and General
    Replies: 1
    Last Post: 04-21-2007, 08:49 PM
  3. Replies: 28
    Last Post: 06-22-2006, 04:27 PM

Posting Permissions

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