Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function OpenGE(var x,y):booean;//This lets you export x and y variables outside the function, to a local level. So they don't have to be global.
- begin
- if(findcolortolerance(x,y,4256431,MSX1,MSY1,MSX2,MSY2,5)) then//Finds the color, and assigns it to x and y, which is declared at the top in the function OpenGE part
- begin
- writeln('Found it!');
- end;
- end;
- procedure MoveThatMouse;
- var
- PointX,PointY:integer;//These can be what ever you want, even x and y, I named them this so it's not confusing.
- begin
- if(OpenGE(PointX,PointY)) then
- begin
- mouse(PointX,PointY,4,4,1);//Moves the mouse to PointX,PointY and clicks the left mouse button.
- writeln('Woo we got it!');
- end;
- end;
- {
- See how it goes? You declare x and y in Function OpenGE, then when you call it, you have to put variables there for the procedure to use, it's what OpenGE assigns the x and y locations to so you can use it over again.
- }
Add Comment
Please, Sign In to add comment