This worked on Ubuntu for me<div><pre style="background-color:rgb(255,255,255);font-size:medium">#N canvas 440 77 450 300 10;
#X obj 27 107 shell;
#X msg 27 13 ifconfig rausb0;
#X obj 27 134 route inet;
#X obj 27 171 unpack s s s s;
#X symbolatom 27 216 10 0 0 0 - - -;
#X msg 27 36 ifconfig wlan0;
#X msg 27 58 ifconfig eth0;
#X connect 0 0 2 0;
#X connect 1 0 0 0;
#X connect 2 0 3 0;
#X connect 3 1 4 0;
#X connect 5 0 0 0;
#X connect 6 0 0 0;</pre><pre style="background-color:rgb(255,255,255);font-size:medium"><a href="http://www.mail-archive.com/pd-list@iem.at/msg27187.html">http://www.mail-archive.com/pd-list@iem.at/msg27187.html</a>
</pre></div><div><br><div class="gmail_quote">On Wed, Jan 4, 2012 at 1:21 PM, Epic Jefferson <span dir="ltr">&lt;<a href="mailto:jeffreyconcepcion@gmail.com">jeffreyconcepcion@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hey guys, has anyone solved this issue for windows 7? I&#39;ve tried to use the getip.bat file solution but the cmd just opens and closes instantly, and nothing gets returned to Pd through the [flatspace/popen] object. Perhaps I&#39;m placing the getip.bat file in the wrong place, but I tried the same patch as the .pd file and also pd/bin, none are working.<div class="HOEnZb">
<div class="h5"><br>

<br><div class="gmail_quote">On Sat, Jan 29, 2011 at 7:46 PM, patko <span dir="ltr">&lt;<a href="mailto:colet.patrice@free.fr" target="_blank">colet.patrice@free.fr</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


I&#39;ve tried on windows vista it works like a charm:<br>
<br>
Microsoft Windows [version 6.0.6002]<br>
Copyright (c) 2006 Microsoft Corporation. Tous droits réservés.<br>
<br>
C:\Users\patko&gt;getip.bat<br>
192.168.0.21<br>
<br>
---<br>
<br>
Please check with &#39;ipconfig&#39; command into cmd prompt if your computer has an IPv4 adress.<br>
<br>
In pd patch the ip adress is displayed into symbol atom, no need to add &#39;pause&#39; command,<br>
<br>
maybe you could try also on your friend&#39;s computer, I&#39;ll try to find a xp machine to see what&#39;s happening.<br>
<br>
<br>
----- &quot;Pierre Massat&quot; &lt;<a href="mailto:pimassat@gmail.com" target="_blank">pimassat@gmail.com</a>&gt; a écrit :<br>
<div><div><br>
&gt; Thank you both for your replies.<br>
&gt; As you can imagine i&#39;m not at all comfortable with batch files. I know<br>
&gt; how to create one from a txt file, but that&#39;s about it.<br>
&gt;<br>
&gt; getip.bat doesn&#39;t work for me. Nothing happens. Even when i try this :<br>
&gt;<br>
&gt; @echo off<br>
&gt; for /F &quot;usebackq tokens=14&quot; %%i in (`ipconfig ^| find /i &quot;IPv4&quot;`) do<br>
&gt; echo %%i<br>
&gt; pause<br>
&gt;<br>
&gt; and launch the script manually, nothing happens in the dos window<br>
&gt; (except &quot;hit a key to continue...&quot; or something).<br>
&gt; Of course it doesn&#39;t work any better in Pd.<br>
&gt;<br>
&gt; Is there something wrong with my version of windows? I have XP. By the<br>
&gt; way, when this works (i trust you!), do you think it&#39;ll work in any<br>
&gt; version of windows? Because i have XP but the friends i&#39;m writing the<br>
&gt; game for have 7 of vista.<br>
&gt;<br>
&gt; Pierre<br>
&gt;<br>
&gt;<br>
&gt; 2011/1/29 patko &lt; <a href="mailto:colet.patrice@free.fr" target="_blank">colet.patrice@free.fr</a> &gt;<br>
&gt;<br>
&gt;<br>
&gt; Hello Pierre,<br>
&gt;<br>
&gt; you can get ip adress with windows cmd<br>
&gt;<br>
&gt;<br>
&gt; In pd-extended there is [flatspace/popen] object for that,<br>
&gt;<br>
&gt; you need to create a file called &#39;getip.bat&#39; containing those lines:<br>
&gt;<br>
&gt; @echo off<br>
&gt; for /F &quot;usebackq tokens=14&quot; %%i in (`ipconfig ^| find /i &quot;IPv4&quot;`) do<br>
&gt; echo %%i<br>
&gt;<br>
&gt; and then you can grab the ip adress from the computer you are in by<br>
&gt; sending [getip.bat&lt; message to [popen] like this:<br>
&gt;<br>
&gt; [getip.bat&lt;<br>
&gt; |<br>
&gt; [flatspace/popen&lt;<br>
&gt; |<br>
&gt; &lt;symbol box&gt;<br>
&gt;<br>
&gt; both patch and batch files must be in the same directory, or put the<br>
&gt; batch file into pd/bin to run it from anywhere<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; ----- &quot;Pedro Lopes&quot; &lt; <a href="mailto:pedro.lopes@ist.utl.pt" target="_blank">pedro.lopes@ist.utl.pt</a> &gt; a écrit :<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; &gt; &lt;lame-solution&gt; Even if there&#39;s no shell/system object for windoes<br>
&gt; &gt; (I&#39;m not using win so I cannot really answer) you can easily create<br>
&gt; a<br>
&gt; &gt; batch script (a windows shell script) that saves the output of<br>
&gt; &gt; ipconfig in a file. Then parse the file with pd and extract the ip<br>
&gt; &gt; from there.<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; It can even by dynamic in the sense that your shell script can be a<br>
&gt; &gt; sort of cron (linux scheduled jobs, I think are called sheduled<br>
&gt; &gt; services in win) and can run a number of times. Thus your game could<br>
&gt; &gt; see the file for the lastest IP.<br>
&gt; &gt;<br>
&gt; &gt; &lt;/lame-solution&gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; On Fri, Jan 28, 2011 at 11:57 PM, Pierre Massat &lt; <a href="mailto:pimassat@gmail.com" target="_blank">pimassat@gmail.com</a><br>
&gt; &gt;<br>
&gt; &gt; wrote:<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; Hi all,<br>
&gt; &gt;<br>
&gt; &gt; Is it possible to get my computer&#39;s IP from inside Pd? I know it&#39;s<br>
&gt; &gt; possible in Linux using the shell object, but it doesn&#39;t exist in<br>
&gt; &gt; windows. I&#39;m trying to make a game requiring two players to play on<br>
&gt; &gt; two different computers, and it&#39;d be very annoying if each user had<br>
&gt; to<br>
&gt; &gt; find her IP before playing.<br>
&gt; &gt;<br>
&gt; &gt; Pierre<br>
&gt; &gt;<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; <a href="mailto:Pd-list@iem.at" target="_blank">Pd-list@iem.at</a> mailing list<br>
&gt; &gt; UNSUBSCRIBE and account-management -&gt;<br>
&gt; &gt; <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; --<br>
&gt; &gt; Pedro Lopes (MSc)<br>
&gt; &gt; contact: <a href="mailto:pedro.lopes@ist.utl.pt" target="_blank">pedro.lopes@ist.utl.pt</a><br>
&gt; &gt; website: <a href="http://web.ist.utl.pt/Pedro.Lopes" target="_blank">http://web.ist.utl.pt/Pedro.Lopes</a> /<br>
&gt; &gt; <a href="http://pedrolopesresearch.wordpress.com/" target="_blank">http://pedrolopesresearch.wordpress.com/</a><br>
&gt; &gt;<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; <a href="mailto:Pd-list@iem.at" target="_blank">Pd-list@iem.at</a> mailing list<br>
&gt; &gt; UNSUBSCRIBE and account-management -&gt;<br>
&gt; &gt; <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>
&gt;<br>
&gt; --<br>
&gt; Patrice Colet<br>
<br>
</div></div><span><font color="#888888">--<br>
Patrice Colet<br>
</font></span><div><div><br>
_______________________________________________<br>
<a href="mailto:Pd-list@iem.at" target="_blank">Pd-list@iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -&gt; <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br><a href="http://www.epicjefferson.com" target="_blank">www.epicjefferson.com</a><br><a href="http://www.avmachinists.org" target="_blank">www.avmachinists.org</a> Puerto Rico based Art Collective/ Non-Profit Org<br>



</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><a href="http://www.epicjefferson.com" target="_blank">www.epicjefferson.com</a><br><a href="http://www.avmachinists.org" target="_blank">www.avmachinists.org</a> Puerto Rico based Art Collective/ Non-Profit Org<br>

</div>