作者GodIsland (搞不定吗用C4就对了)
看板EzHotKey
标题[-AI-] 取得ShellExecute的执行结果
时间Tue Dec 8 22:12:10 2020
https://www.autoitscript.com/forum/topic/203236-shellexecute/
#include<AutoItConstants.au3>
#include<MsgBoxConstants.au3>
$process=Run("help dir","", @SW_MAXIMIZE,$STDOUT_CHILD)
ProcessWaitClose($process) ;w8 the command to be executed
$Result=StdoutRead($process) ;the command output will be stored on $Result
variable
MsgBox($MB_OK,"Command result",$Result) ;show the output on a msgbox
FileWrite("helpdir.txt",$Result) ; save the output in txt file
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 220.132.89.223 (台湾)
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/EzHotKey/M.1607436733.A.5F2.html