ok, first heres how to draw a box
box 100,100,150,150
this draws a box starting 100 pixels across the screen and 100 pixels down the screen, the bottom right of the box is 50 pixels further over than the start (150) and 50 pixels further down
now you have a box to aim at you need a section of code that repeatedly checks for the mouse pointer being somewhere inside the boxes boundary and checking for the mouse button being pressed at the same time, so you start the repeated section with "do" like this
do
then we put in the command that check for the mouse position being inside the box and the button on the mouse being pressed, like this
if mousex()>100 and mousex()<150 and mousey()>100 and mousey()<150 and mouseclick()
this checks for the mouse being more than 100 across the screen AND less than 150 across (so it has to be at the edge or inside the boxes highest and lowest possible x positions), then in the same command it does the same check for the height from 100 to 150, then finaly it checks for the left mouse button being pressed, the symbol < means less than and the symbol > means greater than, if those conditions are met then we do the lines between here and endif, if the mouse is not inside the box or the button is not pressed then we skip the instructions up to endif and just do the rest of the code.
ink rgb(rnd(255),rnd(255),rnd(255)),0
this sets the ink to a random colour, it just puts a random number from 0 to 255 inside the rgb function three times and sets the ink to that
box 100,100,150,150
this draws a new box in exactly the same place as the old box but in the new ink colour, so it makes it look as though the box has changed colour
wait 250
this makes the program wait for 1/4 of a second so that if you held the mouse key down the colour would not change realy fast and look weird or as though nothing was happening but the box flickering
endif
this is the end of the instructions that are followed if the mouse was pressed while the pointer was inside the box, if the pointer was outside the box or you didn`t click the mouse then the program ignores the last few lines and jumps straight to here.
loop
this sends the program back to the "do" part of the loop, starting the check all over again, it will keep doing this forever until you press escape, every loop it will check the position of the mouse pointer and the status of the mouse button, if they are checked and found to be inside the box and the mouse button pressed then it does the instructions between the if statement and endif, if not then the program just loops and checks again, and again, and again etc.
hope thats some help to you, heres the full program for you to try.
box 100,100,150,150
do
if mousex()>100 and mousex()<150 and mousey()>100 and mousey()<150 and mouseclick()
ink rgb(rnd(255),rnd(255),rnd(255)),0
box 100,100,150,150
wait 250
endif
loop
the average IQ is 100...but the people that took the test where trying to look smart. most people don`t go over 50.
Area 51?, I`m more intrested in what they have in areas 1 to 50