找回密码
 加入
搜索
查看: 1547|回复: 4

求一段代码

[复制链接]
发表于 2008-11-1 18:25:00 | 显示全部楼层 |阅读模式
各位大侠,求助
   在01.txt中,打开02.txt.复制里面的文字,粘贴到01.txt中,关闭02.txt,然后打开03.txt,进行同样的操作,以此类推直至09.txt
能否给出上述代码,谢谢!

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
发表于 2008-11-1 19:47:48 | 显示全部楼层
$File2 = FileRead ( "02.txt")
$File3 = FileRead ( "03.txt")
$File4 = FileRead ( "04.txt")
$File5 = FileRead ( "05.txt")
$File6 = FileRead ( "06.txt")
$File7 = FileRead ( "07.txt")
$File8 = FileRead ( "08.txt")
$File9 = FileRead ( "09.txt")

$Write = FileWrite("01.txt", $File2 & $File3 & $File4 & $File5  & $File6  & $File7  & $File8 & $File9  & @CRLF)
if $Write = "1" Then
msgbox (32,"成功","哈哈.so easy")
else
msgbox (16,"失败","靠靠.so hard")


[ 本帖最后由 l4ever 于 2008-11-1 20:17 编辑 ]
 楼主| 发表于 2008-11-1 19:57:03 | 显示全部楼层
文件夹里的文件有几百个啊,另外最好用记录键盘和鼠标的方式来实现,不要用FILEREAD

谢谢

[ 本帖最后由 gzygzy 于 2008-11-1 20:06 编辑 ]
发表于 2008-11-1 20:02:34 | 显示全部楼层
原帖由 gzygzy 于 2008-11-1 19:57 发表
文件夹里的文件有几百个啊,

遍历一下就行了.不难,翻帮助文件
发表于 2008-11-2 13:00:16 | 显示全部楼层
用AU3简单模拟鼠标和键盘动作,太浪费了!

For $i = 2 To 500;如果文件名是有规律的排序,这个数改成你最大的那个文件名
        If $i < 10 Then $i = '0' & $i
        $string = FileRead ($i & ".txt")
        If StringStripCR(StringStripWS($string, 8)) <> '' Then FileWrite("01.txt", @CRLF & $string);如果是没有可见文字的就不向1.txt中写入
Next
MsgBox(64,'','完成!',3)
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-6-26 08:36 , Processed in 0.079372 second(s), 25 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表