$file = FileOpen("1.txt", 32 ) ; 检查打开的文件是否可读 If $file = -1 Then MsgBox(0, "错误", "不能打开文件.") Exit EndIf ; 每次读取一行文本,直到文件结束. While 1 $line = FileReadLine($file) If @error = -1 Then ExitLoop MsgBox(0, "读取的行:", $line) Wend FileClose($file)
您需要 登录 才可以下载或查看,没有账号?加入
举报
GUICreate('', 600, 150) GUISetFont(12, 400, 0, '微软雅黑') GUICtrlCreateEdit(FileRead("1.txt"), 0, 0, 600, 150) GUISetState() While GUIGetMsg() <> -3 WEnd
本版积分规则 发表回复 回帖后跳转到最后一页
|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度
GMT+8, 2025-5-9 14:22 , Processed in 0.106001 second(s), 20 queries .
Powered by Discuz! X3.5 Licensed
© 2001-2025 Discuz! Team.