Posted: Thu May 11, 2006 10:16 pm Post subject: Some part of my coding.
%The status of my mouse
buttonwait ("down", mx, my, buttonnumber, buttondown)
I am just wondering for the mouse status for my program. When I specify "down", will Turing automatically tells itself to wait for the button to be pressed?
Posted: Sat Jun 17, 2006 10:36 pm Post subject: Multi-Button
You forgot to mention Multi-Button, since it wasn't out when you posted this I guess. As you would assume, Multi-Button allows left click, right click, and middle click on Windows (possibly Mac I don't know). At the top of your program, declare:
Now you should set your mouse variables, here's my example:
var x, y, button, none, left, middle, right : int
%Numbers below represent button values
none := 0
left := 1
middle := 10
right := 100
Next you must locate your mouse and status, usually in a loop.
Here I will display current mouse information:
Mouse.Where (x, y, button)
locate (1, 1)
put "X:", x, " Y:", y
if button = none then
put "NOTHING ", button
elsif button = left then
put "LEFT ", button
elsif button = middle then
put "MIDDLE ", button
elsif button = right then
put "RIGHT ", button
Put those three pieces of code together to have a fully functional multi-button mouse!
Posted: Mon Dec 08, 2014 5:11 pm Post subject: Re: [Tutorial] How to use a mouse in your Turing programs
I want to know how to make a picture, uploaded from my computer, to move when the user clicks on it.
Posted: Mon Dec 08, 2014 7:43 pm Post subject: RE:[Tutorial] How to use a mouse in your Turing programs
Easy. Upload a picture from the computer, check if the user clicks on it, then move it.
Posted: Tue Dec 09, 2014 4:54 pm Post subject: Re: [Tutorial] How to use a mouse in your Turing programs