sorry about that. Here's the code for the actual program:
do
sync
red=rnd(255)
green=rnd(255)
blue=rnd(255)
ink RGB(red,green,blue),RGB(red,green,blue)
if mouseclick()=1 then x1#=mouseX():y1#=mouseY():once#=0
if mouseclick()=2 and once#=0 then x2#=mouseX():y2#=mouseY():line x1#,y1#,x2#,y2#:once#=1
sync
loop
And here's the code for the weird psychadelic pattern program.....thing
do
sync
red=rnd(255)
green=rnd(255)
blue=rnd(255)
ink RGB(red,green,blue),RGB(red,green,blue)
if mouseclick()=1 then x1#=mouseX():y1#=mouseY()
if mouseclick()=2 then x2#=mouseX():y2#=mouseY():line x1#,y1#,x2#,y2#
sync
loop
Basically i first tried to make a really simple program(as its my first one) just to draw lines on the screen. (left click somewhere then rightclick somewhere else) and on the way to making that program i made this second one which is actually kinda cool and fun. (it works in the same way, just left click where you want the line to start and right click where you want it to end) The difference between the two was just that the second (accidental) program made lots and lots of lines instead of just one.