Guest User

Untitled

a guest
Oct 17th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. 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.
  2. begin
  3. 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
  4. begin
  5. writeln('Found it!');
  6. end;
  7. end;
  8. procedure MoveThatMouse;
  9. var
  10. PointX,PointY:integer;//These can be what ever you want, even x and y, I named them this so it's not confusing.
  11. begin
  12. if(OpenGE(PointX,PointY)) then
  13. begin
  14. mouse(PointX,PointY,4,4,1);//Moves the mouse to PointX,PointY and clicks the left mouse button.
  15. writeln('Woo we got it!');
  16. end;
  17. end;
  18.  
  19. {
  20. 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.
  21. }
Add Comment
Please, Sign In to add comment