[Scilab-users] xclick without waiting for event ?
Stéphane Mottelet
stephane.mottelet at utc.fr
Tue Jun 11 22:22:09 CEST 2019
Hello Philipp,
You can do this this by using an event_handler function which updates
two variables in the main workspace:
function event_handler_function(h, x, y, ibut)
if ibut == -1
[MOUSE_X,MOUSE_Y]=resume(x,y);
end
end
gcf().event_handler = "event_handler_function";
gcf().event_handler_enable = "on";
MOUSE_X and MOUSE_Y will always contain the current coordinates of the
mouse pointer
S.
Le 09/06/2019 à 21:26, P M a écrit :
> Dear Experts,
>
> is there a way to get the mouse position without waiting for an event?
>
> With xgetmouse and xclick it is possible to get the mouse position,
> but the functions return the position only if there was an event.
> So the functions wait until the mouse is moved/clicked etc.
>
> I'ld like to get the mouse position even when the mouse is not
> moved/clicked etc.
>
> Thank you,
> Philipp
>
>
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users
--
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
http://www.utc.fr/~mottelet
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20190611/3eb21bed/attachment.htm>
More information about the users
mailing list