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