Howto read a line from a file and the delete that line from file in one step?

Lüth, Carsten <[email protected]> Fri, 22 Feb 2008 13:32:06 +0100
Newsgroups gmane.comp.windows.autoit.user
Message-ID <[email protected]>
--hKsNiIEfhZU2cw8cWQJvnFBj3NBdpqRBiMF3sxR
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hello autoit friends,
=20
Howto read a line from a file and the delete that line from file in one ste=
p?
Any ideas?
=20
;~~~~~~~~~~~~~~~~~~~~~~~~~~~
$file =3D FileOpen("test.txt", 1)
$line =3D FileReadLine($file)
ToolTip($line, 0, 500)
sleep(1000)
FileWriteLine($file, "")
;~~~~~~~~~~~~~~~~~~~~~~~~~~~
; Script don't work!
=20
Has anybody a working script-example?
=20
Mit freundlichem Gru=DF / With kind regards=20

Fielmann AG=20

Carsten L=FCth
IT - Desktop Services
Weidestra=DFe 118a
22083 Hamburg
Telefon: +49 - (0) 40 - 2 70 76 - 199
mailto:[email protected]=20



__________________________________________

Fielmann Aktiengesellschaft - Sitz der Gesellschaft: Hamburg -
HRB 56098 - Aufsichtsratsvorsitzender: Prof. Dr. Mark K. Binz -
Vorstand: G=FCnther Fielmann (Vors.), G=FCnter Schmid,=20
Georg Alexander Zeiss, Dr. Stefan Thies


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


--hKsNiIEfhZU2cw8cWQJvnFBj3NBdpqRBiMF3sxR
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable


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




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

<!--~-|**|PrettyHtmlStartT|**|-~-->
<div id=3D"ygrp-mlmsg" style=3D"width:655px; position:relative;">
  <div id=3D"ygrp-msg" style=3D"width: 490px; padding: 0 15px 0 0; float:le=
ft;  z-index:1;">
<!--~-|**|PrettyHtmlEndT|**|-~-->

    <div id=3D"ygrp-text">
            <p>Hello autoit friends,<br>
 <br>
Howto read a line from a file and the delete that line from file in one ste=
p?<br>
Any ideas?<br>
 <br>
;~~~~~~~~~~~<wbr>~~~~~~~~~<wbr>~~~~~~~<br>
$file =3D FileOpen(&quot;test.<wbr>txt&quot;, 1)<br>
$line =3D FileReadLine(<wbr>$file)<br>
ToolTip($line, 0, 500)<br>
sleep(1000)<br>
FileWriteLine(<wbr>$file, &quot;&quot;)<br>
;~~~~~~~~~~~<wbr>~~~~~~~~~<wbr>~~~~~~~<br>
; Script don't work!<br>
 <br>
Has anybody a working script-example?<br>
 <br>
Mit freundlichem Gru=DF / With kind regards <br>
<br>
Fielmann AG <br>
<br>
Carsten L=FCth<br>
IT - Desktop Services<br>
Weidestra=DFe 118a<br>
22083 Hamburg<br>
Telefon: &#43;49 - (0) 40 - 2 70 76 - 199<br>
mailto:<a href=3D"mailto:c.lueth%40fielmann.com">c.lueth@fielmann.<wbr>com<=
/a> <br>
<br>
____________<wbr>_________<wbr>_________<wbr>_________<wbr>___<br>
<br>
Fielmann Aktiengesellschaft - Sitz der Gesellschaft: Hamburg -<br>
HRB 56098 - Aufsichtsratsvorsit<wbr>zender: Prof. Dr. Mark K. Binz -<br>
Vorstand: G=FCnther Fielmann (Vors.), G=FCnter Schmid, <br>
Georg Alexander Zeiss, Dr. Stefan Thies<br>
<br>
[Non-text portions of this message have been removed]<br>
<br>
</p>
    </div>=20=20

    <!--~-|**|PrettyHtmlStart|**|-~-->
    <span width=3D"1" style=3D"color: white;">__._,_.___</span>
    <!-- Start the section with Message In topic -->
    <div id=3D"ygrp-actbar">
              <span class=3D"left">
          <a href=3D"http://groups.yahoo.com/group/AutoItList/message/31570=
;_ylc=3DX3oDMTM2aHVxMTk3BF9TAzk3MzU5NzE0BGdycElkAzMwMjM1NTAEZ3Jwc3BJZAMxNzA=
1MTQ0NzA4BG1zZ0lkAzMxNTczBHNlYwNmdHIEc2xrA3Z0cGMEc3RpbWUDMTIwMzY4NDE2MQR0cG=
NJZAMzMTU3MA--">
            Messages in this topic          </a> (<span class=3D"bld">3</sp=
an>)
        </span>
        <a href=3D"http://groups.yahoo.com/group/AutoItList/post;_ylc=3DX3o=
DMTJxaG50cGhrBF9TAzk3MzU5NzE0BGdycElkAzMwMjM1NTAEZ3Jwc3BJZAMxNzA1MTQ0NzA4BG=
1zZ0lkAzMxNTczBHNlYwNmdHIEc2xrA3JwbHkEc3RpbWUDMTIwMzY4NDE2MQ--?act=3Dreply&=
messageNum=3D31573">
          <span class=3D"bld">
            Reply          </span> (via web post)
        </a>  |=20
        <a href=3D"http://groups.yahoo.com/group/AutoItList/post;_ylc=3DX3o=
DMTJlcjVidGJiBF9TAzk3MzU5NzE0BGdycElkAzMwMjM1NTAEZ3Jwc3BJZAMxNzA1MTQ0NzA4BH=
NlYwNmdHIEc2xrA250cGMEc3RpbWUDMTIwMzY4NDE2MQ--" class=3D"bld">
          Start a new topic        </a>
          </div>=20
    <!-------     Start Nav Bar  ------>
    <!-- |**|begin egp html banner|**| -->
    <div id=3D"ygrp-vitnav">
                <a href=3D"http://groups.yahoo.com/group/AutoItList/message=
s;_ylc=3DX3oDMTJlZTViZ2R2BF9TAzk3MzU5NzE0BGdycElkAzMwMjM1NTAEZ3Jwc3BJZAMxNz=
A1MTQ0NzA4BHNlYwNmdHIEc2xrA21zZ3MEc3RpbWUDMTIwMzY4NDE2MQ--">Messages</a> =
=20
            |    <a href=3D"http://groups.yahoo.com/group/AutoItList/files;=
_ylc=3DX3oDMTJmajYzNGMxBF9TAzk3MzU5NzE0BGdycElkAzMwMjM1NTAEZ3Jwc3BJZAMxNzA1=
MTQ0NzA4BHNlYwNmdHIEc2xrA2ZpbGVzBHN0aW1lAzEyMDM2ODQxNjE-">Files</a>=20=20
            |    <a href=3D"http://groups.yahoo.com/group/AutoItList/photos=
;_ylc=3DX3oDMTJlYTZvcWJrBF9TAzk3MzU5NzE0BGdycElkAzMwMjM1NTAEZ3Jwc3BJZAMxNzA=
1MTQ0NzA4BHNlYwNmdHIEc2xrA3Bob3QEc3RpbWUDMTIwMzY4NDE2MQ--">Photos</a>=20=20
            |    <a href=3D"http://groups.yahoo.com/group/AutoItList/links;=
_ylc=3DX3oDMTJmc3FmZ2dqBF9TAzk3MzU5NzE0BGdycElkAzMwMjM1NTAEZ3Jwc3BJZAMxNzA1=
MTQ0NzA4BHNlYwNmdHIEc2xrA2xpbmtzBHN0aW1lAzEyMDM2ODQxNjE-">Links</a>=20=20
            |    <a href=3D"http://groups.yahoo.com/group/AutoItList/databa=
se;_ylc=3DX3oDMTJjZGxzN2MxBF9TAzk3MzU5NzE0BGdycElkAzMwMjM1NTAEZ3Jwc3BJZAMxN=
zA1MTQ0NzA4BHNlYwNmdHIEc2xrA2RiBHN0aW1lAzEyMDM2ODQxNjE-">Database</a>=20=20
            |    <a href=3D"http://groups.yahoo.com/group/AutoItList/polls;=
_ylc=3DX3oDMTJmbjBvNWowBF9TAzk3MzU5NzE0BGdycElkAzMwMjM1NTAEZ3Jwc3BJZAMxNzA1=
MTQ0NzA4BHNlYwNmdHIEc2xrA3BvbGxzBHN0aW1lAzEyMDM2ODQxNjE-">Polls</a>=20=20
            |    <a href=3D"http://groups.yahoo.com/group/AutoItList/member=
s;_ylc=3DX3oDMTJlcjlpdGV2BF9TAzk3MzU5NzE0BGdycElkAzMwMjM1NTAEZ3Jwc3BJZAMxNz=
A1MTQ0NzA4BHNlYwNmdHIEc2xrA21icnMEc3RpbWUDMTIwMzY4NDE2MQ--">Members</a> =
=20
            |    <a href=3D"http://groups.yahoo.com/group/AutoItList/calend=
ar;_ylc=3DX3oDMTJkOHR1c28zBF9TAzk3MzU5NzE0BGdycElkAzMwMjM1NTAEZ3Jwc3BJZAMxN=
zA1MTQ0NzA4BHNlYwNmdHIEc2xrA2NhbARzdGltZQMxMjAzNjg0MTYx">Calendar</a>=20=20
    </div>=20=20
    <!-- |**|end egp html banner|**| -->

                <div id=3D"ygrp-grft">
              </div>
=20=20=20=20
    <!-- yahoo logo -->
    <!-- |**|begin egp html banner|**| -->
    <div id=3D"ygrp-ft">
      <a href=3D"http://groups.yahoo.com/;_ylc=3DX3oDMTJkOWhndTc4BF9TAzk3Mz=
U5NzE0BGdycElkAzMwMjM1NTAEZ3Jwc3BJZAMxNzA1MTQ0NzA4BHNlYwNmdHIEc2xrA2dmcARzd=
GltZQMxMjAzNjg0MTYx">
      <img src=3D"http://us.i1.yimg.com/us.yimg.com/i/yg/img/logo/ma_grp_16=
0.gif" height=3D"15" width=3D"106" border=3D"0" alt=3D"Yahoo! Groups"></a> =
<br>
      <a href=3D"http://groups.yahoo.com/group/AutoItList/join;_ylc=3DX3oDM=
TJmYTJzaTV2BF9TAzk3MzU5NzE0BGdycElkAzMwMjM1NTAEZ3Jwc3BJZAMxNzA1MTQ0NzA4BHNl=
YwNmdHIEc2xrA3N0bmdzBHN0aW1lAzEyMDM2ODQxNjE-">Change settings via the Web</=
a> (Yahoo! ID required) <br>
      Change settings via email: <a href=3D"mailto:AutoItList-digest@yahoog=
roups.com?subject=3DEmail Delivery: Digest">Switch delivery to Daily Digest=
</a> | <a href =3D "mailto:[email protected]?subject=
=3DChange Delivery Format: Traditional">Switch format to Traditional</a> <b=
r>

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

=20=20
  <!-- Sponsor -->
  <!-- |**|begin egp html banner|**| -->
  <div id=3D"ygrp-sponsor" style=3D"width:140px;float: left; clear: none; m=
argin-left: 5px; background:white; margin-bottom:25px ;position:absolute; t=
op:0; right: 0;">
    <!-- Network content -->
=20=20=20=20
    <!-- Start vitality -->
    <div id=3D"ygrp-vital">
              <div id=3D"vithd">Recent Activity</div>
        <ul style=3D"list-style-type:none; padding: 0; margin: 2px 0;">
                <li style=3D"clear: both;">
      <div class=3D"ct" style=3D"float: right;"><span style=3D"display:none=
">&nbsp;</span>11</div>
      <div class=3D"cat"><a href=3D"http://groups.yahoo.com/group/AutoItLis=
t/members;_ylc=3DX3oDMTJmZTE0MmQ2BF9TAzk3MzU5NzE0BGdycElkAzMwMjM1NTAEZ3Jwc3=
BJZAMxNzA1MTQ0NzA4BHNlYwN2dGwEc2xrA3ZtYnJzBHN0aW1lAzEyMDM2ODQxNjE-">New Mem=
bers</a></div>
    </li>
=20=20
=20=20=20=20=20=20=20=20=20=20=20=20
=20=20=20=20=20=20=20=20=20=20=20=20
=20=20=20=20=20=20=20=20=20=20=20=20
=20=20=20=20=20=20=20=20=20=20=20=20
=20=20=20=20=20=20=20=20=20=20=20=20
        </ul>
            <a href=3D"http://groups.yahoo.com/group/AutoItList;_ylc=3DX3oD=
MTJldDYxYmRsBF9TAzk3MzU5NzE0BGdycElkAzMwMjM1NTAEZ3Jwc3BJZAMxNzA1MTQ0NzA4BHN=
lYwN2dGwEc2xrA3ZnaHAEc3RpbWUDMTIwMzY4NDE2MQ--">
        Visit Your Group      </a>
    </div>=20
=20=20=20=20=20=20=20=20=20=20=20=20=20=20
    <!-- Network content -->
              <div id=3D"nc">
              <div class=3D"ad">
                      <div id=3D"hd1">All-Bran</div>=20
<p><a href=3D"http://us.ard.yahoo.com/SIG=3D13oo5247m/M=3D493064.12016283.1=
2445687.8674578/D=3Dgroups/S=3D1705144708:NC/Y=3DYAHOO/EXP=3D1203691361/L=
=3D/B=3Dv2wyF0Je5FY-/J=3D1203684161438007/A=3D5202323/R=3D0/SIG=3D11aijbghb=
/*http://new.groups.yahoo.com/allbrangroup">10 Day Challenge</a></p>=20
<p>Join the club and</p>=20
<p>feel the benefits.</p>                  </div>
                    <div class=3D"ad">
                      <div id=3D"hd1">Yahoo! Groups</div>=20
<p><a href=3D"http://us.ard.yahoo.com/SIG=3D13oftus71/M=3D493064.12117566.1=
2537396.8674578/D=3Dgroups/S=3D1705144708:NC/Y=3DYAHOO/EXP=3D1203691361/L=
=3D/B=3DwGwyF0Je5FY-/J=3D1203684161438007/A=3D5170407/R=3D0/SIG=3D11gfoiqic=
/*http://advision.webevents.yahoo.com/craftsman/">How-To Zone</a></p>=20
<p>Do-It-Yourselfers</p>=20
<p>Connect &amp; share.</p>                  </div>
                    <div class=3D"ad">
                      <div id=3D"hd1">Special K Group</div>=20
<p><a href=3D"http://us.ard.yahoo.com/SIG=3D13ph9lmb2/M=3D493064.12016300.1=
2445692.11323196/D=3Dgroups/S=3D1705144708:NC/Y=3DYAHOO/EXP=3D1203691361/L=
=3D/B=3DwWwyF0Je5FY-/J=3D1203684161438007/A=3D5170420/R=3D0/SIG=3D11b5gu1oe=
/*http://new.groups.yahoo.com/specialKgroup">on Yahoo! Groups</a></p>=20
<p>Join the challenge</p>=20
<p>and lose weight.</p>                  </div>
          </div>
=20=20=20=20
  </div>   <!-- |**|end egp html banner|**| -->
  <div style=3D"clear:both; color: #FFF; font-size:1px;">.</div>
</div>   <img src=3D"http://geo.yahoo.com/serv?s=3D97359714/grpId=3D3023550=
/grpspId=3D1705144708/msgId=3D31573/stime=3D1203684161/nc1=3D5202323/nc2=3D=
5170407/nc3=3D5170420" width=3D"1" height=3D"1"> <br>

<span  style=3D"color: white;">__,_._,___</span>
<!--~-|**|PrettyHtmlEnd|**|-~-->
</body>
<!--~-|**|PrettyHtmlStart|**|-~-->
<head>
<style type=3D"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=3D"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=3D"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-se=
rif;}
#ygrp-mlmsg pre, code {font:115% monospace;*font-size:100%;}
#ygrp-mlmsg * {line-height:1.22em;}
#ygrp-text{
    font-family: Georgia;=09
}
#ygrp-text p{
    margin: 0 0 1em 0;
}
#ygrp-tpmsgs{
    font-family: Arial;=09
    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;=20
  padding: 5px 0;=20
}
#ygrp-mlmsg #logo{
  padding-bottom: 10px;
}

#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;=20=20
}
#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 -->


--hKsNiIEfhZU2cw8cWQJvnFBj3NBdpqRBiMF3sxR--