Jump to content
DarkEdge975

Simple When color appears it clicks.

Recommended Posts

    program New;
           var ColorCheck: Integer = <1769463>;
           var CheckX: Integer = <200>;
           var CheckY: Integer = <250>;

           var ClickX: Integer = <1200>;
           var ClickY: Integer = <900>;

           var Check_Wait: Integer = <250>;
   begin

   repeat

       if(1 <> 2)then
        begin
          wait(Check_Wait)
          if (GetColor(CheckX,CheckY) = ColorCheck) then
          begin
             ClickMouse(ClickX,ClickY, True);
          end;
        end;


   until(1 = 2);
     end.

 

Getting a compile error. Saying line 2 has a expected semicolon (";")

 

I think I am doing it right. But am not sure at all. I eventually want to turn it into a script that knows the image its supposed to be watching and when it changes color it clicks instantly.

 

Link to comment
Share on other sites

Not sure where you got the idea that syntax would work... SCAR Divi doesn't allow variable initialization and I have no idea what the deal is with the <> surrounding the integers...

 

[scar]program New;

 

const

ColorCheck = 1769463;

CheckX = 200;

CheckY = 250;

ClickX = 1200;

ClickY = 900;

Check_Wait = 250;

 

begin

repeat

if(1 <> 2)then

begin

Wait(Check_Wait)

if (GetColor(CheckX, CheckY) = ColorCheck) then

begin

ClickMouse(ClickX, ClickY, True);

end;

end;

until(1 = 2);

end.[/scar]

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
  • Create New...