Results 1 to 6 of 6

Thread: Simple Problem(FindColor)

  1. #1
    Join Date
    Feb 2007
    Location
    Lux Aeterna
    Posts
    171
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Simple Problem(FindColor)

    Code:
    program PicktheWheat;
    {.include srl/srl.scar}
    var
     x,y:integer;
    begin
     if findcolorspiraltolerance(x,y,4218457,MSX1,MSY1,MSX2,MSY2,70) then
     begin
     mmouse(x,y,x,y);
     if isuptext('Pick Wheat') then
     begin
     mouse(x,y,0,0,false);
     chooseoption('Pick Wheat');
     end;
     end;
    end.
    I selected the window, and set it up. But when I ran it, the findcolorspiraltolerance, goes very very very slowly.
    It works, just very slowly.
    What did I do wrong? Please, I'm grateful.
    Also, I have MS, but what does MI(Main Invent) do?

  2. #2
    Join Date
    Dec 2007
    Location
    192.168.1.73
    Posts
    2,439
    Mentioned
    6 Post(s)
    Quoted
    119 Post(s)

    Default

    Try setting your mousespeed to either 15 or 20, like so:
    SCAR Code:
    MouseSpeed := 15 {or 20};

    The default for SCAR is 1, so it will run very slowly, but if you put SetupSRL as the first thing in your main loop, it will set up the mouse speed to 15.

  3. #3
    Join Date
    Feb 2007
    Location
    Lux Aeterna
    Posts
    171
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Hey, thank you Richard.
    I put SetupSRL after the first begin and it worked!
    Thank you!

  4. #4
    Join Date
    Jul 2008
    Location
    Canada
    Posts
    1,612
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Random standard fix :
    SCAR Code:
    program PicktheWheat;
    {.include srl/srl.scar}
    var
        x,y:integer;
    begin
       SetupSRL;
       if findcolorspiraltolerance(x,y,4218457,MSX1,MSY1,MSX2,MSY2,70) then
       begin
          mmouse(x,y,x,y);
          if isuptext('Pick Wheat') then
          begin
             mouse(x,y,0,0,false);
             chooseoption('Pick Wheat');
        end;
      end;
    end.

    SCAR Code:
    Program Scartags;
    {.include SCAR\TAGS}
    begin
        if PostScript then
        begin
            usetags;//my standards aren't good when coding in post box,.
            Writeln('Syntax is now correct :p');
         end;
    end.
    Last edited by Smarter Child; 04-25-2009 at 02:39 AM.

  5. #5
    Join Date
    Mar 2008
    Location
    ::1
    Posts
    915
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    You forgot to add SetupSRL; This sets up SRL (DUH!). So, before you do pretty much anything, add the following...
    SCAR Code:
    ActivateClient;
    SetupSRL;

    That should fix the problem you're having.

    EDIT: This is different from Dan's post because I mention ActivateClient...

    Records and Types Save Code (and make you look better)
    Quote Originally Posted by Wizzup? View Post
    Is it possible to make Runescape a 2D game with this?... That would greatly simplify... Just about anything.

  6. #6
    Join Date
    Dec 2007
    Location
    192.168.1.73
    Posts
    2,439
    Mentioned
    6 Post(s)
    Quoted
    119 Post(s)

    Default

    Dan didn't post anything, that was me Dan just stole my avvy and claims he had it first

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
  •