----- Mail original -----
De: "Epic Jefferson" jeffreyconcepcion@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;