找回密码
 加入
搜索
楼主: friendtasy

[AU3基础] run系统cmd命令得到的自定义变量如何在autoit中调用?

 火.. [复制链接]
发表于 2011-3-21 19:13:10 | 显示全部楼层
回复 15# netegg
仿佛我明白了什么,赶紧去试验
发表于 2011-3-26 17:48:05 | 显示全部楼层
谢谢15楼,又学到一个知识点:
#include <Constants.au3>

Local $foo = Run(@ComSpec & " /c ipconfig /all", @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)
Local $line
While 1
    $line = StdoutRead($foo)
    If @error Then ExitLoop
    MsgBox(0, "STDOUT read:"&@error, $line)
Wend

While 1
    $line = StderrRead($foo)
    If @error Then ExitLoop
    MsgBox(0, "STDERR read:"&@error, $line)
Wend
发表于 2011-3-28 15:47:04 | 显示全部楼层
为什么很多人都推荐 >>*.txt呢    不愿意看到运行程序时出现多余文件
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-5-20 07:42 , Processed in 0.074292 second(s), 14 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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