If you're going to make a crapplication then you should put some effort into it. Observe:
` Source code for Mouse Works - By viewing this source code you agree that Microsoft will own you, your company, its employees and a small plot of land near Ipswich. If you decline this agreement yet still decide to view the source code then you are breaking the law and should immediately contact the authorities.
set window on
set window title "Mouse Works"
set display mode 320, 240, 32
sync on : sync rate 0
backdrop on : color backdrop rgb(236,233,216)
set text font "arial" : set text size 12 : set text opaque : ink 0, rgb(236,233,216)
load dll "User32.dll",1
do
panel(5,5,300,200, "Mouse information")
text 10, 20, "This super handy application that has now become a standard in all"
text 10, 30, "Microsoft OS' will tell you if you're moving the mouse in a certain"
text 10, 40, "direction and how far the mouse is being moved from it's original"
text 10, 50, "screen position. It will also display which mouse buttons you're"
text 10, 60, "pressing. The perfect way to learn which mouse button is which."
msc = mouseclick()
msx = mousemovex()
msy = mousemovey()
panel(10,80,295,195, "Live mouse data")
if msx <> 0
text 10, 90, "You're moving the mouse " + str$(msx) + " on the x axis."
endif
if msy <> 0
text 10, 100, "You're moving the mouse " + str$(msy) + " on the y axis."
endif
select msc
case 0
text 10, 115, "The mouse is now active."
endcase
case 1
text 10, 115, "You're using the left mouse button."
endcase
case 2
text 10, 115, "You're using the right mouse button."
endcase
case 3
text 10, 115, "You're using both the left mouse button and the right mouse button."
endcase
case 4
text 10, 115, "You're using the middle mouse button."
endcase
case default
a = MessageBox("Critical error","Mouse Works has created an illegal operation and will now close."+chr$(13)+"This will also close windows because it wants people to feel sorry for it.",16)
end
endcase
endselect
sync
loop
delete dll 1
`This command doesn't actually delete the dll, it just clears it from memory. I would prefer it to be called close dll so that newbies don't get scared from using dll's, but then, maybe that was the point.
end
function panel(x1,y1,x2,y2,caption as string)
box x1,y1+text height("|")/2,x2,y2, rgb(208,208,191), rgb(208,208,191), rgb(208,208,191), rgb(208,208,191)
box x1+1,y1+1+text height("|")/2,x2-1,y2-1, rgb(236,233,216), rgb(236,233,216), rgb(236,233,216), rgb(236,233,216)
ink rgb(0,70,213), rgb(236,233,216)
text x1+10,y1, caption
ink 0, rgb(236,233,216)
endfunction
FUNCTION MessageBox(Caption as string, mtext as string, mtype)
`This function was actually made by Cave Man - it can be found by searching for 'message box'
RV = call dll(1,"MessageBoxA",0,mtext,Caption,mtype)
endfunction RV
You are not alone.