Jump to content
Camosnide

Please help with this....

Recommended Posts

Program FindColorClickColor;



Procedure FindClick;
Var
 X,Y,W,H: Integer;
begin
    FindWindowTitlePart('Camosnides', false);
        ActivateClient;
 Wait(3000)
    GetClientDimensions(W,H);
    If FindColor(X,Y,2249071,18,36,W,H) then
 Begin
    MoveWindMouse(X,Y,18,36);
    ClickMouse(X,Y,True);
 end;
     Wait(10000)
   GetClientDimensions(W,H);
    If FindColor(X,Y,8104578,18,36,W,H) then
 Begin
   MoveWindMouse(X,Y,18,36);
   ClickMouse(X,Y,True);
   end;
   Begin
    GetClientDimensions(W,H);
    If FindColor(X,Y,1194716,18,36,W,H) then
 Begin
   MoveWindMouse(X,Y,18,36);
   ClickMouse(X,Y,True);

 end;
   Begin
     GetClientDimensions(W,H);
    If FindColor(X,Y,2632000,18,36,W,H) then
 Begin
   MoveWindMouse(X,Y,18,36);
   ClickMouse(X,Y,True);

 end;
end; 

begin
 Repeat 
   FindClick;
   Wait(150);
 Until False;
end. <<<<<<< Says Here Compiler Error 48 Identifier expected. ???

Link to comment
Share on other sites

It's because you need to end; all your begin's.

 

Why do you place begin's when you dont need it :-)?

 

Example:

[sCAR]If FindColor(X,Y,8104578,18,36,W,H) then

Begin

MoveWindMouse(X,Y,18,36);

ClickMouse(X,Y,True);

end;

Begin //This isn't needed [/sCAR]

 

Btw, remember to tag you text as SCAR code and not PHP code :-)

Link to comment
Share on other sites

Ok thanks that has made it work apart from.

[sCAR]Program FindColorClickColor;

 

 

 

Procedure FindClick;

Var

X,Y,W,H: Integer;

begin

FindWindowTitlePart('Camosnides', false);

ActivateClient;

Wait(3000)

GetClientDimensions(W,H);

If FindColor(X,Y,2249071,18,36,W,H) then

Begin

MoveWindMouse(X,Y,18,36);

ClickMouse(X,Y,True);

end;

Wait(1000) ///////////////////////////////This part here i would like

GetClientDimensions(W,H); // ///////It to press the number 3 key

If FindColor(X,Y,8104578,18,36,W,H) then //Instead of find its colour

Begin /////////////////////Then i would like it to click

MoveWindMouse(X,Y,18,36); // //////////////// On this color

ClickMouse(X,Y,True); ////////////////////

end; /////////////////////

 

GetClientDimensions(W,H);

If FindColor(X,Y,1194716,18,36,W,H) then /////// HERE!

Begin

MoveWindMouse(X,Y,18,36);

ClickMouse(X,Y,True);

 

end;

 

GetClientDimensions(W,H);

If FindColor(X,Y,2632000,18,36,W,H) then

Begin

MoveWindMouse(X,Y,18,36);

ClickMouse(X,Y,True);

 

end;

end;

 

begin

Repeat

FindClick;

Wait(150);

Until False;

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...