[PD] IP address in windows?

Patrice Colet colet.patrice at free.fr
Fri Jan 6 03:49:18 CET 2012



----- Mail original -----
> De: "Epic Jefferson" <jeffreyconcepcion at gmail.com>

> getip.bat file solution but the cmd just opens and closes instantly,
> and
> nothing gets returned to Pd through the [flatspace/popen] object.

 This method doesn't work anymore since popen external has changed a bit,

in attached archive there is a patch and a dos script for getting ip,

this is working with pd-extended-20111221 under windows vista,

you have to specify pdsend.exe path in getip.bat, then you will receive ip address

from netreceive.

dos script:

@echo off

set path="C:\Program Files (x86)\pd\bin";%path%

for /F "usebackq tokens=14" %%i in (`ipconfig ^| find /i "IPv4"`) do (
echo %%i; | pdsend 5555
)

pd patch:

#N canvas 200 200 450 300 10;
#X symbolatom 170 162 15 0 0 0 - - -;
#X obj 170 120 moonlib/popen;
#X msg 170 80 open getip.bat;
#X obj 170 210 netreceive 5555;
#X obj 270 240 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X obj 170 240 print;
#X connect 1 0 0 0;
#X connect 2 0 1 0;
#X connect 3 0 5 0;
#X connect 3 1 4 0;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: getip.zip
Type: application/zip
Size: 548 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20120106/7a42b6c2/attachment.zip>


More information about the Pd-list mailing list