[-AI-] 取得ShellExecute的执行结果

楼主: GodIsland (搞不定吗用C4就对了)   2020-12-08 22:12:10
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

Links booklink

Contact Us: admin [ a t ] ucptt.com