Re: Examples not working

"Nahuel José" <[email protected]> Thu, 20 Mar 2008 20:23:32 -0300
Newsgroups gmane.comp.windows.autoit.user
Message-ID <[email protected]>
---o7ZgKFPLEPOGv31ktIM6hiHrWu6XpmSV2UrKav
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

I can't see anything there, except for a linefeed on line 4 that shouldn't
be there, but I think that's just my browser. I've run that example and it
works fine. Remove unintentional linefeeds caused by copying and pasting.
Try this one too:
http://www.autoitscript.com/autoit3/docs/functions/StdoutRead.htm
luck. Nahuel.




2008/3/20, Martin Courcelles <[email protected]>:
>
> hello there,
> i'm trying to run examples from the autoit help file, but they compile
> with
> an error.
> here's an example of a script I'm trying to run.
> #include <Constants.au3>
>
> $foo = Run(@ComSpec & " /c dir foo.bar", @SystemDir, @SW_HIDE,
> $STDERR_CHILD + $STDOUT_CHILD)
>
> While 1
>     $line = StdoutRead($foo)
>     If @error Then ExitLoop
>     MsgBox(0, "STDOUT read:", $line)
> Wend
>
> While 1
>     $line = StderrRead($foo)
>     If @error Then ExitLoop
>     MsgBox(0, "STDERR read:", $line)
> Wend
>
> MsgBox(0, "Debug", "Exiting...")
>
>
> I get an error on line 6 saying that it can't parse that line.
> Any ideas what I'm missing here?
> Cheers,
> martin
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>
>


-- 
-Nahuel-


[Non-text portions of this message have been removed]


---o7ZgKFPLEPOGv31ktIM6hiHrWu6XpmSV2UrKav
Content-Type: text/html; charset=US-ASCII
Content-Transfer-Encoding: 7bit


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
</head>




<body style="background-color: #ffffff;">

<!--~-|**|PrettyHtmlStartT|**|-~-->
<div id="ygrp-mlmsg" style="width:655px; position:relative;">
<div id="ygrp-msg" style="width: 470px; margin:0; padding:0 25px 0 0; float:left; z-index:1;">
<!--~-|**|PrettyHtmlEndT|**|-~-->

    <div id="ygrp-text">
            <p>I can't see anything there, except for a linefeed on line 4 that shouldn't<br>
be there, but I think that's just my browser. I've run that example and it<br>
works fine. Remove unintentional linefeeds caused by copying and pasting.<br>
Try this one too:<br>
<a href="http://www.autoitscript.com/autoit3/docs/functions/StdoutRead.htm">http://www.autoitsc<wbr>ript.com/<wbr>autoit3/docs/<wbr>functions/<wbr>StdoutRead.<wbr>htm</a><br>
luck. Nahuel.<br>
<br>
2008/3/20, Martin Courcelles &lt;<a href="mailto:mcourcel%40gmail.com">mcourcel@gmail.<wbr>com</a>&gt;:<br>
&gt;<br>
&gt; hello there,<br>
&gt; i'm trying to run examples from the autoit help file, but they compile<br>
&gt; with<br>
&gt; an error.<br>
&gt; here's an example of a script I'm trying to run.<br>
&gt; #include &lt;Constants.au3&gt;<br>
&gt;<br>
&gt; $foo = Run(@ComSpec &amp; &quot; /c dir foo.bar&quot;, @SystemDir, @SW_HIDE,<br>
&gt; $STDERR_CHILD + $STDOUT_CHILD)<br>
&gt;<br>
&gt; While 1<br>
&gt;     $line = StdoutRead($<wbr>foo)<br>
&gt;     If @error Then ExitLoop<br>
&gt;     MsgBox(0, &quot;STDOUT read:&quot;, $line)<br>
&gt; Wend<br>
&gt;<br>
&gt; While 1<br>
&gt;     $line = StderrRead($<wbr>foo)<br>
&gt;     If @error Then ExitLoop<br>
&gt;     MsgBox(0, &quot;STDERR read:&quot;, $line)<br>
&gt; Wend<br>
&gt;<br>
&gt; MsgBox(0, &quot;Debug&quot;, &quot;Exiting...&quot;<wbr>)<br>
&gt;<br>
&gt;<br>
&gt; I get an error on line 6 saying that it can't parse that line.<br>
&gt; Any ideas what I'm missing here?<br>
&gt; Cheers,<br>
&gt; martin<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; ------------<wbr>---------<wbr>---------<wbr>------<br>
&gt;<br>
&gt; Yahoo! Groups Links<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
<br>
-- <br>
-Nahuel-<br>
<br>
[Non-text portions of this message have been removed]<br>
<br>
</p>
    </div>  

    <!--~-|**|PrettyHtmlStart|**|-~-->
    <span width="1" style="color: white;">__._,_.___</span>
    <!-- Start the section with Message In topic -->
    <div id="ygrp-actbar">
              <span class="left">
          <a href="http://groups.yahoo.com/group/AutoItList/message/31606;_ylc=X3oDMTM2Y3AxNWtuBF9TAzk3MzU5NzE0BGdycElkAzMwMjM1NTAEZ3Jwc3BJZAMxNzA1MTQ0NzA4BG1zZ0lkAzMxNjExBHNlYwNmdHIEc2xrA3Z0cGMEc3RpbWUDMTIwNjA1NTQyMAR0cGNJZAMzMTYwNg--">
            Messages in this topic          </a> (<span class="bld">2</span>)
        </span>
        <a href="http://groups.yahoo.com/group/AutoItList/post;_ylc=X3oDMTJxcDcxcWtuBF9TAzk3MzU5NzE0BGdycElkAzMwMjM1NTAEZ3Jwc3BJZAMxNzA1MTQ0NzA4BG1zZ0lkAzMxNjExBHNlYwNmdHIEc2xrA3JwbHkEc3RpbWUDMTIwNjA1NTQyMA--?act=reply&messageNum=31611">
          <span class="bld">
            Reply          </span> (via web post)
        </a>  | 
        <a href="http://groups.yahoo.com/group/AutoItList/post;_ylc=X3oDMTJlMmk0azdnBF9TAzk3MzU5NzE0BGdycElkAzMwMjM1NTAEZ3Jwc3BJZAMxNzA1MTQ0NzA4BHNlYwNmdHIEc2xrA250cGMEc3RpbWUDMTIwNjA1NTQyMA--" class="bld">
          Start a new topic        </a>
          </div> 
    <!-------     Start Nav Bar  ------>
    <!-- |**|begin egp html banner|**| -->
    <div id="ygrp-vitnav">
                <a href="http://groups.yahoo.com/group/AutoItList/messages;_ylc=X3oDMTJlOWY5NmJ1BF9TAzk3MzU5NzE0BGdycElkAzMwMjM1NTAEZ3Jwc3BJZAMxNzA1MTQ0NzA4BHNlYwNmdHIEc2xrA21zZ3MEc3RpbWUDMTIwNjA1NTQyMA--">Messages</a>  
            |    <a href="http://groups.yahoo.com/group/AutoItList/files;_ylc=X3oDMTJmNmRhcDYyBF9TAzk3MzU5NzE0BGdycElkAzMwMjM1NTAEZ3Jwc3BJZAMxNzA1MTQ0NzA4BHNlYwNmdHIEc2xrA2ZpbGVzBHN0aW1lAzEyMDYwNTU0MjA-">Files</a>  
            |    <a href="http://groups.yahoo.com/group/AutoItList/photos;_ylc=X3oDMTJlbmJxOTVlBF9TAzk3MzU5NzE0BGdycElkAzMwMjM1NTAEZ3Jwc3BJZAMxNzA1MTQ0NzA4BHNlYwNmdHIEc2xrA3Bob3QEc3RpbWUDMTIwNjA1NTQyMA--">Photos</a>  
            |    <a href="http://groups.yahoo.com/group/AutoItList/links;_ylc=X3oDMTJmazBoNHBzBF9TAzk3MzU5NzE0BGdycElkAzMwMjM1NTAEZ3Jwc3BJZAMxNzA1MTQ0NzA4BHNlYwNmdHIEc2xrA2xpbmtzBHN0aW1lAzEyMDYwNTU0MjA-">Links</a>  
            |    <a href="http://groups.yahoo.com/group/AutoItList/database;_ylc=X3oDMTJjMGJnbGNvBF9TAzk3MzU5NzE0BGdycElkAzMwMjM1NTAEZ3Jwc3BJZAMxNzA1MTQ0NzA4BHNlYwNmdHIEc2xrA2RiBHN0aW1lAzEyMDYwNTU0MjA-">Database</a>  
            |    <a href="http://groups.yahoo.com/group/AutoItList/polls;_ylc=X3oDMTJmcDliOWtyBF9TAzk3MzU5NzE0BGdycElkAzMwMjM1NTAEZ3Jwc3BJZAMxNzA1MTQ0NzA4BHNlYwNmdHIEc2xrA3BvbGxzBHN0aW1lAzEyMDYwNTU0MjA-">Polls</a>  
            |    <a href="http://groups.yahoo.com/group/AutoItList/members;_ylc=X3oDMTJlZHJocGExBF9TAzk3MzU5NzE0BGdycElkAzMwMjM1NTAEZ3Jwc3BJZAMxNzA1MTQ0NzA4BHNlYwNmdHIEc2xrA21icnMEc3RpbWUDMTIwNjA1NTQyMA--">Members</a>  
            |    <a href="http://groups.yahoo.com/group/AutoItList/calendar;_ylc=X3oDMTJkMWRxNzBiBF9TAzk3MzU5NzE0BGdycElkAzMwMjM1NTAEZ3Jwc3BJZAMxNzA1MTQ0NzA4BHNlYwNmdHIEc2xrA2NhbARzdGltZQMxMjA2MDU1NDIw">Calendar</a>  
    </div>  
    <!-- |**|end egp html banner|**| -->

                <div id="ygrp-grft">
              </div>
    
    <!-- yahoo logo -->
    <!-- |**|begin egp html banner|**| -->
    <div id="ygrp-ft">
      <a href="http://groups.yahoo.com/;_ylc=X3oDMTJkdDdjYWIyBF9TAzk3MzU5NzE0BGdycElkAzMwMjM1NTAEZ3Jwc3BJZAMxNzA1MTQ0NzA4BHNlYwNmdHIEc2xrA2dmcARzdGltZQMxMjA2MDU1NDIw">
      <img src="http://us.i1.yimg.com/us.yimg.com/i/yg/img/logo/ma_grp_160.gif" height="15" width="106" border="0" alt="Yahoo! Groups"></a> <br>
      <a href="http://groups.yahoo.com/group/AutoItList/join;_ylc=X3oDMTJmYjNicDZlBF9TAzk3MzU5NzE0BGdycElkAzMwMjM1NTAEZ3Jwc3BJZAMxNzA1MTQ0NzA4BHNlYwNmdHIEc2xrA3N0bmdzBHN0aW1lAzEyMDYwNTU0MjA-">Change settings via the Web</a> (Yahoo! ID required) <br>
      Change settings via email: <a href="mailto:[email protected]?subject=Email Delivery: Digest">Switch delivery to Daily Digest</a> | <a href = "mailto:[email protected]?subject=Change Delivery Format: Traditional">Switch format to Traditional</a> <br>

      <a href="http://groups.yahoo.com/group/AutoItList;_ylc=X3oDMTJkbGNlam9jBF9TAzk3MzU5NzE0BGdycElkAzMwMjM1NTAEZ3Jwc3BJZAMxNzA1MTQ0NzA4BHNlYwNmdHIEc2xrA2hwZgRzdGltZQMxMjA2MDU1NDIw">
        Visit Your Group 
      </a> |
      <a href="http://docs.yahoo.com/info/terms/">
        Yahoo! Groups Terms of Use      </a> |
      <a href="mailto:[email protected]?subject=">
        Unsubscribe      </a> 
    </div>     <!-- |**|end egp html banner|**| -->
  </div> <!-- ygrp-msg -->

  
  <!-- Sponsor -->
  <!-- |**|begin egp html banner|**| -->
  <div id="ygrp-sponsor" style="width:160px; float:right; clear:none; margin:0 0 25px 0; background:white;">
    <!-- Network content -->
    
<!-- Start Recommendations -->
<div id="ygrp-reco">
     </div>
<!-- End Recommendations -->

	    <!-- Start vitality -->
	    <div id="ygrp-vital">
	      		<div id="vithd">Recent Activity</div>
		<ul style="list-style-type:none; padding: 0; margin: 2px 0;">
		        <li style="clear: both;">
      <div class="ct" style="float: right;"><span style="display:none">&nbsp;</span>11</div>
      <div class="cat"><a href="http://groups.yahoo.com/group/AutoItList/members;_ylc=X3oDMTJmamJrNWNzBF9TAzk3MzU5NzE0BGdycElkAzMwMjM1NTAEZ3Jwc3BJZAMxNzA1MTQ0NzA4BHNlYwN2dGwEc2xrA3ZtYnJzBHN0aW1lAzEyMDYwNTU0MjA-">New Members</a></div>
    </li>
  
		    
		    
		    
		    
		    
		</ul>
	      	      <a href="http://groups.yahoo.com/group/AutoItList;_ylc=X3oDMTJlazcwbjJtBF9TAzk3MzU5NzE0BGdycElkAzMwMjM1NTAEZ3Jwc3BJZAMxNzA1MTQ0NzA4BHNlYwN2dGwEc2xrA3ZnaHAEc3RpbWUDMTIwNjA1NTQyMA--">
		Visit Your Group	      </a>
	    </div> 
	    	    	      
	    <!-- Network content -->
	    	          <div id="nc">
              <div class="ad">
                      <div id="hd1">Need traffic?</div> 
<p><a href="http://us.ard.yahoo.com/SIG=13og2acke/M=493064.12016308.12445700.8674578/D=groups/S=1705144708:NC/Y=YAHOO/EXP=1206062620/L=/B=Z_0QCtFJq10-/J=1206055420561449/A=3848644/R=0/SIG=131l83flq/*http://searchmarketing.yahoo.com/arp/srchv2.php?o=US2006&cmp=Yahoo&ctv=Groups5&s=Y&s2=&s3=&b=50">Drive customers</a></p> 
<p>With search ads</p> 
<p>on Yahoo!</p>                  </div>
                    <div class="ad">
                      <div id="hd1">Y! Groups blog</div> 
<p><a href="http://us.ard.yahoo.com/SIG=13olm99gf/M=493064.12016258.12582637.8674578/D=groups/S=1705144708:NC/Y=YAHOO/EXP=1206062620/L=/B=aP0QCtFJq10-/J=1206055420561449/A=5191953/R=0/SIG=112mhte3e/*http://www.ygroupsblog.com/blog/">The place to go</a></p> 
<p>to stay informed</p> 
<p>on Groups news!</p>                  </div>
                    <div class="ad">
                      <div id="hd1">Cat Groups</div> 
<p><a href="http://us.ard.yahoo.com/SIG=13okaenjl/M=493064.12016263.12445670.8674578/D=groups/S=1705144708:NC/Y=YAHOO/EXP=1206062620/L=/B=af0QCtFJq10-/J=1206055420561449/A=4836037/R=0/SIG=11olbte0b/*http://advision.webevents.yahoo.com/catzone/index.html">on Yahoo! Groups</a></p> 
<p>discuss everything</p> 
<p>related to cats.</p>                  </div>
          </div>
	    
	  </div> 	  <!-- |**|end egp html banner|**| -->
	  <div style="clear:both; color: #FFF; font-size:1px;">.</div>
	</div> 		  <img src="http://geo.yahoo.com/serv?s=97359714/grpId=3023550/grpspId=1705144708/msgId=31611/stime=1206055420/nc1=3848644/nc2=5191953/nc3=4836037" width="1" height="1"> <br>
	
	<span  style="color: white;">__,_._,___</span>
	<!--~-|**|PrettyHtmlEnd|**|-~-->
	</body>
	<!--~-|**|PrettyHtmlStart|**|-~-->
	<head>
<style type="text/css">
<!--
#ygrp-mkp{
  border: 1px solid #d8d8d8;
  font-family: Arial;
  margin: 14px 0px;
  padding: 0px 14px;
}
#ygrp-mkp hr{
  border: 1px solid #d8d8d8;
}
#ygrp-mkp #hd{
  color: #628c2a;
  font-size: 85%;
  font-weight: bold;
  line-height: 122%;
  margin: 10px 0px;
}
#ygrp-mkp #ads{
  margin-bottom: 10px;
}
#ygrp-mkp .ad{
  padding: 0 0;
}
#ygrp-mkp .ad a{
  color: #0000ff;
  text-decoration: none;
}
-->
</style>
</head>
	<head>
<style type="text/css">
<!--
#ygrp-sponsor #ygrp-lc{
  font-family: Arial;
}
#ygrp-sponsor #ygrp-lc #hd{
  margin: 10px 0px;
  font-weight: bold;
  font-size: 78%;
  line-height: 122%;
}
#ygrp-sponsor #ygrp-lc .ad{
  margin-bottom: 10px;
  padding: 0 0;
}
-->
</style>
</head>
	<head>
	<style type="text/css">
	<!--
	#ygrp-mlmsg {font-size:13px; font-family: arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;}
	#ygrp-mlmsg table {font-size:inherit;font:100%;}
	#ygrp-mlmsg select, input, textarea {font:99% arial,helvetica,clean,sans-serif;}
	#ygrp-mlmsg pre, code {font:115% monospace;*font-size:100%;}
	#ygrp-mlmsg * {line-height:1.22em;}
	#ygrp-text{
	    font-family: Georgia;	
	}
	#ygrp-text p{
	    margin: 0 0 1em 0;
	}
	#ygrp-tpmsgs{
	    font-family: Arial;	
	    clear: both;
	}
	#ygrp-vitnav{
		padding-top: 10px;
		font-family: Verdana;
		font-size: 77%;
		margin: 0;
	}
	#ygrp-vitnav a{
		padding: 0 1px;
	}
	#ygrp-actbar{
		clear: both;
		margin: 25px 0;
		white-space:nowrap;
		color: #666;
		text-align: right;
	}
	#ygrp-actbar .left{
		float: left;
		white-space:nowrap;
	}
	.bld{font-weight:bold;}
	#ygrp-grft{
		font-family: Verdana;
		font-size: 77%;
		padding: 15px 0;
	}
	#ygrp-ft{
	  font-family: verdana;
	  font-size: 77%;
	  border-top: 1px solid #666; 
	  padding: 5px 0; 
	}
	#ygrp-mlmsg #logo{
	  padding-bottom: 10px;
	}

	#ygrp-reco {
	margin-bottom: 20px;
	padding: 0px;
	}
	#ygrp-reco #reco-head {
		font-weight: bold;
		color: #ff7900;
	}

	#reco-grpname{
        font-weight: bold;
        margin-top: 10px;
  	}
	#reco-category{
        	font-size: 77%;
	}
	#reco-desc{
        	font-size: 77%;
	}

	#ygrp-vital{
		background-color: #e0ecee;
		margin-bottom: 20px;
		padding: 2px 0 8px 8px;
	}
	#ygrp-vital #vithd{
		font-size: 77%;
		font-family: Verdana;
		font-weight: bold;
		color: #333;
		text-transform: uppercase;
	}
	#ygrp-vital ul{
		padding: 0;
		margin: 2px 0;
	}
	#ygrp-vital ul li{
	  list-style-type: none;
	  clear: both;
	  border: 1px solid #e0ecee;  
	}
	#ygrp-vital ul li .ct{
	  font-weight: bold;
	  color: #ff7900;
	  float: right;
	  width: 2em;
	  text-align:right;
	  padding-right: .5em;
	}
	#ygrp-vital ul li .cat{
	  font-weight: bold;
	}
	#ygrp-vital a{
		text-decoration: none;
	}

	#ygrp-vital a:hover{
	  text-decoration: underline;
	}

	#ygrp-sponsor #hd{
		color: #999;
		font-size: 77%;
	}
	#ygrp-sponsor #ov{
		padding: 6px 13px;
		background-color: #e0ecee;
		margin-bottom: 20px;
	}
	#ygrp-sponsor #ov ul{
		padding: 0 0 0 8px;
		margin: 0;
	}
	#ygrp-sponsor #ov li{
		list-style-type: square;
		padding: 6px 0;
		font-size: 77%;
	}
	#ygrp-sponsor #ov li a{
		text-decoration: none;
		font-size: 130%;
	}
	#ygrp-sponsor #nc{
	  background-color: #eee;
	  margin-bottom: 20px;
	  padding: 0 8px;
	}
	#ygrp-sponsor .ad{
		padding: 8px 0;
	}
	#ygrp-sponsor .ad #hd1{
		font-family: Arial;
		font-weight: bold;
		color: #628c2a;
		font-size: 100%;
		line-height: 122%;
	}
	#ygrp-sponsor .ad a{
		text-decoration: none;
	}
	#ygrp-sponsor .ad a:hover{
		text-decoration: underline;
	}
	#ygrp-sponsor .ad p{
		margin: 0;
	}
	o{font-size: 0; }
	.MsoNormal{
	   margin: 0 0 0 0;
	}
	#ygrp-text tt{
	  font-size: 120%;
	}
	blockquote{margin: 0 0 0 4px;}
	.replbq{margin:4}
	-->
	</style>
	</head>
	<!--~-|**|PrettyHtmlEnd|**|-~-->
	</html><!--End group email -->


---o7ZgKFPLEPOGv31ktIM6hiHrWu6XpmSV2UrKav--