comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » How to get mouse values in ION
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
How to get mouse values in ION [message #27488] Wed, 24 October 2001 15:47
James Adams is currently offline  James Adams
Messages: 7
Registered: October 2001
Junior Member
Hello,

I have been trying to get mouse values from the ION system variable
$Mouse. However everything is not working as advertised, or more likely
I have misunderstood how to use this to get my mouse location I keep
getting (0, 0) for the (X, Y) of my mouse, and I don't think this is
correct. Attached is a brief ION Script which demonstrates what I'm
trying to do. Thanks in advance for any assistance or suggestions.

-James Adams



------------ GetMouseLocation.ion ---------------


<ION_SCRIPT>

<ION_HEADER>

<title>ION Mouse Location ION</title>

<EVENTS>
<EVENT_DECL NAME="REDRAW" ACTION="ion://GetMouseLocation.ion" />

</EVENTS>

<VARIABLE>
<VARIABLE_DECL NAME="X" VALUE="$Mouse.X" TYPE="INT",
PERSIST="TRUE" />
<VARIABLE_DECL NAME="Y" VALUE="$Mouse.Y" TYPE="INT",
PERSIST="TRUE" />
</VARIABLE>

</ION_HEADER>

<CENTER>

<H2>Mouse Location</H2>


<ION_BODY>

<B>Mouse X: </B><ION_EVALUATE EXPR="$Mouse.X" DISPLAY="TRUE" />
<BR>
<B>Mouse Y: </B><ION_EVALUATE EXPR="$Mouse.Y" DISPLAY="TRUE" />


<ION_DATA_OUT>
<IDL>
print, 'Mouse X Value: ', $Mouse.X
print, 'Mouse Y Value: ', $Mouse.Y
print, 'Variable X: ', $X
print, 'Variable Y: ', $Y
</IDL>
</ION_DATA_OUT>


<ION_FORM>
<ION_BUTTON TYPE="BUTTON" EVENT="REDRAW" LABEL="Redraw" />
</ION_FORM>

</ION_BODY>


</CENTER>

</ION_SCRIPT>
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Widget_Draw - Help
Next Topic: Polygon filling erratum

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:44:14 PDT 2025

Total time taken to generate the page: 0.00532 seconds