找回密码
 加入
搜索
查看: 1886|回复: 3

[AU3基础] 【已解決】請教-執行了FileRead(FileOpen以后,_RunDos 變無效。

[复制链接]
发表于 2012-11-30 16:05:45 | 显示全部楼层 |阅读模式
本帖最后由 wenquan79 于 2012-12-3 09:08 编辑

如題,代碼如下,執行了FileRead(FileOpen及FileWrite(FileOpen以后,_RUNDOS會變無效,請幫忙看一下問題出在哪,謝謝!

#include <Process.au3>
$1_tex = FileRead(FileOpen("1.txt", 0))
$2_tex = FileRead(FileOpen("2.txt", 0))
$3_tex = FileRead(FileOpen("3.txt", 0))
$4_tex = FileRead(FileOpen("4.txt", 0))
FileWrite(FileOpen("Result.txt", 10), $1_tex & $3_tex & $2_tex & $4_tex)
Local $rc = _RunDos("start result.txt")
发表于 2012-11-30 17:08:06 | 显示全部楼层
没有 FileClose。
$1_tex = FileRead('1.txt')
$2_tex = FileRead('2.txt')
$3_tex = FileRead('3.txt')
$4_tex = FileRead('4.txt')
$FO = FileOpen('Result.txt', 2 + 8)
FileWrite($FO, $1_tex & $3_tex & $2_tex & $4_tex)
FileClose($FO)
Local $rc = _RunDOS('start result.txt')
发表于 2012-12-2 21:18:45 | 显示全部楼层
回复 2# afan
原来没有fileopen,也是可以fileread的,原来都不知道,学习了!
 楼主| 发表于 2012-12-3 09:08:44 | 显示全部楼层
回复 2# afan
如afan 兄所說,是沒有FileClose所致,已解決,感謝!
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-9-20 07:25 , Processed in 0.072197 second(s), 21 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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