<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hello Philipp,</p>
<p>You can do this this by using an event_handler function which
updates two variables in the main workspace:</p>
<pre style="font-family:Monospaced;font-style:normal;font-size:14.0;"><span style="color:rgb(176,24,19);">function</span> <span style="color:rgb(0,0,0);text-decoration:underline;">event_handler_function</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(131,67,16);font-weight:bold;">h</span><span style="color:rgb(0,0,0);">, </span><span style="color:rgb(131,67,16);font-weight:bold;">x</span><span style="color:rgb(0,0,0);">, </span><span style="color:rgb(131,67,16);font-weight:bold;">y</span><span style="color:rgb(0,0,0);">, </span><span style="color:rgb(131,67,16);font-weight:bold;">ibut</span><span style="color:rgb(74,85,219);">)</span>
<span style="color:rgb(160,32,240);">if</span> <span style="color:rgb(131,67,16);font-weight:bold;">ibut</span> <span style="color:rgb(92,92,92);">==</span> <span style="color:rgb(92,92,92);">-</span><span style="color:rgb(188,143,143);">1</span>
<span style="color:rgb(74,85,219);">[</span><span style="color:rgb(0,0,0);">MOUSE_X</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(0,0,0);">MOUSE_Y</span><span style="color:rgb(74,85,219);">]</span><span style="color:rgb(92,92,92);">=</span><span style="color:rgb(95,158,160);">resume</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(131,67,16);font-weight:bold;">x</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(131,67,16);font-weight:bold;">y</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(0,0,0);">;</span>
<span style="color:rgb(160,32,240);">end</span>
<span style="color:rgb(160,32,240);">end</span>
<span style="color:rgb(174,92,176);text-decoration:underline;">gcf</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(92,92,92);">.</span><span style="color:rgb(170,170,170);">event_handler</span> <span style="color:rgb(92,92,92);">=</span> <span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">event_handler_function</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(0,0,0);">;</span>
<span style="color:rgb(174,92,176);text-decoration:underline;">gcf</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(92,92,92);">.</span><span style="color:rgb(170,170,170);">event_handler_enable</span> <span style="color:rgb(92,92,92);">=</span> <span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">on</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(0,0,0);">;</span></pre>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">MOUSE_X and MOUSE_Y will always contain
the current coordinates of the mouse pointer<br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">S.</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">Le 09/06/2019 à 21:26, P M a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:CACf7ODskfRy-jLOseK280kTsRCPqaiGYcsK5brTxTgdC8aOUiA@mail.gmail.com">
<div dir="ltr">
<div>Dear Experts,</div>
<div><br>
</div>
<div>is there a way to get the mouse position without waiting
for an event?</div>
<div><br>
</div>
<div>With xgetmouse and xclick it is possible to get the mouse
position, but the functions return the position only if there
was an event.</div>
<div>So the functions wait until the mouse is moved/clicked etc.</div>
<div><br>
</div>
<div>I'ld like to get the mouse position even when the mouse is
not moved/clicked etc.</div>
<div><br>
</div>
<div>Thank you,</div>
<div>Philipp<br>
</div>
<div><br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:users@lists.scilab.org">users@lists.scilab.org</a>
<a class="moz-txt-link-freetext" href="https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users">https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
<a class="moz-txt-link-freetext" href="http://www.utc.fr/~mottelet">http://www.utc.fr/~mottelet</a></pre>
</body>
</html>