找回密码
 加入
搜索
查看: 2088|回复: 0

[效率算法] [已解决]风行者的console.au3 UDF 里的CoutRead()函数读多了会出现问题

[复制链接]
发表于 2015-2-5 17:12:20 | 显示全部楼层 |阅读模式
本帖最后由 zhouhaijin 于 2015-2-8 21:02 编辑

CoutRead()一直读取有时候会读不到正常内容,System("cls") 了也一样


Getch()是等待输入
要是有等待输出就好了



#include "Console.au3"
$CmdPID = ProcessExists("cmd.exe")
ConAttach($CmdPID)
SetTitle("GetData")
System("mode con cols=60 lines=100")
WinMove("GetData","",100,100,520,400)
While 1
        $Cmdstr = StringStripCR(StringStripWS(CoutRead(7000), 8))
        If StringRight($Cmdstr, 4) = "Data" Then;有时候有结尾='Data'也不清屏,应该是读的问题。
                System("cls") ;清屏
                Sleep(100)
        EndIf
;这里加sleep(10)也一样会出问题
WEnd

http://www.autoitx.com/forum.php ... p;extra=&page=1
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-5-12 11:44 , Processed in 0.074808 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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