Is it possible to obtain the mouse coordinates ?

Download0091 shared this question 7 years ago
Answered

Hello,


There is an option to show the mouse coordinates. I'd like to set a point or a couple of numbers (a,b) to the coordinates of the mouse cursor. Can this be done ?


Thank you for your help,


John.

Comments (9)

photo
2

Hi John,


I think: no way.

(but you can shift a point with the mouse)


Raymond


Addendum (after post of Noel):

Sorry: I read not correct the question (I read: "ask in the scripts" [but this stay nowhere in your question :flushed: ])

photo
1

Hi Raymond,

I think: no way.


I believe you are right. I was hoping you could pull them out of your hat (like a rabbit) ;-)


John.

photo
1

Noel,


One small problem. If you use undo at any time the coordinates disappear, even though they are still checked in Graphics.


Simon

photo
1

Addendum (after post of Noel):

Sorry: I read not correct the question (I read: "ask in the scripts" [but this stay nowhere in your question :flushed: ])


You understood correctly what I meant. I want to use the mouse coordinates in some scripts. Among other things, I want a point or a couple of numbers (a,b) to track the mouse location.


John.

photo
1

Hi all


I think a "corner[20]" with the actual Cursor-Position that would be helpful in different interactive Applets.

When he is defined in the Algebra-View, he follow the cursor like a point but without pressed left mouse key (also when he is not visible). This point has the events OnClick and OnUpdate and all other properties from a normal point (similar like the others corner[]).


Raymond

photo
1

Hi all


I think a "corner[20]" with the actual Cursor-Position that would be helpful in different interactive Applets.

When he is defined in the Algebra-View, he follow the cursor like a point but without pressed left mouse key (also when he is not visible). This point has the events OnClick and OnUpdate and all other properties from a normal point (similar like the others corner[]).


Raymond

+1


We could do, for example, this :

"Create the point (2,3)"

When the student put the mouse at (10,20), we say "very cold"

When the student come closer to the point, we say "warmer"

When the student put the mouse near (3,2), we say "Hmmmm are you sure ?"

:smiley_cat:


GeoGebra becoming AI artificial intelligence !!!

photo
1

Yes. I hope we can have a scripting command to access and check mouse coordinates, since the option to display mouse coordinates on the cross hair of the cursor is in the system


Being able to make use of the mouse coordinate values, we can do something like mouse over effects, and more interesting interactive exercises, including gaming elements are possible.


Mouse over effect can be used to provide hints, explanations and support learning when student move cursor to explore the screen.


Now I need to use another object, drag it on the graphics canvas and check the object's point coordinates to do interactive feedback. See my example at : http://tube.geogebra.org/m/2968059

If mouse coordinate is available, the learner need not drag another object in order to explore the screen?


Best Regards,

lewws

photo
1

Hi,

Further example of simplified shooting game if mouse coordinate can be used instead of dragged object's coordinates


See my example : Shooting of the bug at http://www.geogebra.org/m/2004199


Regards,

lewws

photo
1

Sorry, we won't be adding the option to get mouse coordinates

Comments have been locked on this page!

© 2023 International GeoGebra Institute