Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 [Tutorial] How to use a mouse in your Turing programs
Index -> Programming, Turing -> Turing Tutorials
Goto page Previous  1, 2
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Tony




PostPosted: Thu Nov 24, 2005 4:32 pm   Post subject: (No subject)

Flash and MSN weren't made with Turing Wink
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Sponsor
Sponsor
Sponsor
sponsor
MysticVegeta




PostPosted: Thu Nov 24, 2005 6:26 pm   Post subject: (No subject)

This can be done in VB right?
Tony




PostPosted: Thu Nov 24, 2005 7:14 pm   Post subject: (No subject)

anything with Windows API access. VB is pretty simple, there are code sniplets available all over the place (MSDN?).
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
The_Triangle




PostPosted: Thu Nov 24, 2005 8:24 pm   Post subject: (No subject)

what does Windows API access stand for?

And why doesnt turing have access to it ? Wouldnt it be so much easier... damn.. lol
Tony




PostPosted: Thu Nov 24, 2005 8:36 pm   Post subject: (No subject)

no, it would make things unneccessary complicated - that's why.

you'd need to hook Turing into the OS, and perform all those low level operations. Not something you teach highschool students.. or want them to be able to use for that matter.

Just imagine - program calls a command to make mouse cursor invisible, then quits. Oh damn it, you've just lost your mouse until you reboot or write another program to fix things.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
[Gandalf]




PostPosted: Fri Nov 25, 2005 3:33 pm   Post subject: (No subject)

API stands for Application Program Inferface.
Dan




PostPosted: Sun Nov 27, 2005 7:57 pm   Post subject: (No subject)

Tony wrote:

Just imagine - program calls a command to make mouse cursor invisible, then quits. Oh damn it, you've just lost your mouse until you reboot or write another program to fix things.


And thats why VB is a script kiddys dream.
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
[Gandalf]




PostPosted: Mon Nov 28, 2005 1:04 am   Post subject: (No subject)

Maybe if you edited the executable, and changed the cursor there? Just an idea...
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Mon Nov 28, 2005 9:23 am   Post subject: (No subject)

you could Sys.Exec() VB programs that change cursors for you.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
progammin_nub




PostPosted: 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)

Hello,
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?
Guest




PostPosted: 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:
code:

Mouse.ButtonChoose("multibutton")


Now you should set your mouse variables, here's my example:
code:

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:
code:

loop
    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
    end if
end loop


Put those three pieces of code together to have a fully functional multi-button mouse!
gohabsgo007




PostPosted: 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. Confused
Insectoid




PostPosted: 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.
gohabsgo007




PostPosted: Tue Dec 09, 2014 4:54 pm   Post subject: Re: [Tutorial] How to use a mouse in your Turing programs

BooHoo
Display posts from previous:   
   Index -> Programming, Turing -> Turing Tutorials
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 2 of 2  [ 29 Posts ]
Goto page Previous  1, 2
Jump to:   


Style:  
Search: