Jump to content
djkristoph

need help plsss

Recommended Posts

hi, i search command for loop :) ok lets go, i write script to search pixel: ths is my code

 

program New;

var x,y:integer;

 

procedure click;

begin

if not(findcolor(x,y,79071,680,270,1900,1000)) then //i went if complete go to next search color, if not complete loop this command

 

 

begin

if not(findcolor(x,y,879127,8,8,1900,1000)) then

KeyDown(32);

if (findcolor(x,y,879127,8,8,1900,1000)) then

KeyUp(32);

if (findcolor(x,y,7708856,8,8,1900,1000)) then

KeyDown(27);

KeyUp(27);

end;

 

end;

 

 

 

 

begin

repeat

click;

until false

end.

Link to comment
Share on other sites

[scar] program New;

var x,y:integer;

 

procedure click;

begin

if not(findcolor(x,y,79071,680,270,1900,1000)) then //i went if complete go to next search color, if not complete loop this command

 

 

repeat

if not(findcolor(x,y,879127,8,8,1900,1000)) then

begin

KeyDown(32);

break;

end;

if (findcolor(x,y,879127,8,8,1900,1000)) then

begin

KeyUp(32);

break;

end;

if (findcolor(x,y,7708856,8,8,1900,1000)) then

begin

KeyDown(27);

//wait(sometime);

KeyUp(27);

break;

end;

until(false);

 

end;[/scar]

 

break - will leave loop,

And after if statment you must add begin - end if you have more then one statment

Link to comment
Share on other sites

hmm ok, how is a code , I give example: if done procedure1 go to procedure2, i error procedure1 loop procedure 1


Hmm i cant run script:) where add begin and end.


i added end. and have error Line 29: [Error] (29:1): 'BEGIN' expected in script

 

 

procedure has no value you must use function

you mean if function1 = true go to procedure2 if function1 = false loop function1?

[scar]

repeat

 

until(function1 = true);

function2

[/scar]

same thing

[scar]

repeat

 

until(function1);

function2

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