Camosnide Posted May 8, 2012 Share Posted May 8, 2012 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. ??? Quote Link to comment Share on other sites More sharing options...
sjesper Posted May 8, 2012 Share Posted May 8, 2012 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 :-) Quote Link to comment Share on other sites More sharing options...
Camosnide Posted May 8, 2012 Author Share Posted May 8, 2012 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] Quote Link to comment Share on other sites More sharing options...