Look at this patch, maybe it can help you.
++

Jack


Le samedi 19 septembre 2009 à 23:49 +0100, Alex Lucas a écrit :
> Hi everyone,
> 
> 
> Is there any way of making MouseState output X-Y coordinates which are
> relative to the patch window rather than the screen as a whole?
> 
> 
> Thanks,
> Alex
> _______________________________________________
> [email protected] mailing list
> UNSUBSCRIBE and account-management -> 
> http://lists.puredata.info/listinfo/pd-list
#N canvas 318 169 855 459 10;
#X text 644 410 Jack/RYBN 2009;
#X msg 39 68 32;
#X obj 39 95 makefilename getPositionWindows.pd%c;
#X msg 39 121 \$1 - /home/jack/Documents/PureData/PD FourreTout;
#X obj 39 200 shell;
#X obj 39 147 list2symbol;
#X obj 39 231 unpack s s s f;
#X obj 93 261 pack s f;
#X obj 93 309 route X: Y:;
#X obj 93 284 list trim;
#X msg 39 170 xwininfo -name "\$1" | grep "Absolute upper-left";
#X obj 39 20 loadbang;
#X obj 122 19 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X floatatom 427 385 5 0 0 0 - - -;
#X text 462 385 X;
#X obj 93 355 s Xcoord;
#X obj 124 335 s Ycoord;
#X obj 413 246 MouseState;
#X obj 427 359 -;
#X obj 442 338 r Xcoord;
#X floatatom 441 317 5 0 0 0 - - -;
#X obj 441 291 -;
#X text 476 317 Y;
#X msg 413 224 poll;
#X obj 413 199 loadbang;
#X obj 456 270 r Ycoord;
#X text 273 95 <- the name of your windows \, here;
#X text 338 121 <- and here;
#X text 523 85 For me : "getPositionWindows.pd - /home/jack/Documents/PureData/PD
FourreTout;
#X text 523 115 Note : there are two spaces after .pd;
#X obj 39 46 delay 1000;
#X text 148 16 <- bang if you move the window;
#X connect 1 0 2 0;
#X connect 2 0 3 0;
#X connect 3 0 5 0;
#X connect 4 0 6 0;
#X connect 5 0 10 0;
#X connect 6 2 7 0;
#X connect 6 3 7 1;
#X connect 7 0 9 0;
#X connect 8 0 15 0;
#X connect 8 1 16 0;
#X connect 9 0 8 0;
#X connect 10 0 4 0;
#X connect 11 0 30 0;
#X connect 12 0 1 0;
#X connect 17 1 18 0;
#X connect 17 2 21 0;
#X connect 18 0 13 0;
#X connect 19 0 18 1;
#X connect 21 0 20 0;
#X connect 23 0 17 0;
#X connect 24 0 23 0;
#X connect 25 0 21 1;
#X connect 30 0 1 0;
_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list

Reply via email to