GUICreate("Form1", 495, 136, 353, 335)
$Button1 = GUICtrlCreateButton("QQ路径", 32, 16, 65, 25)
$Combo1 = GUICtrlCreateCombo('', 104, 16, 369, 21)
$Button2 = GUICtrlCreateButton("查找路径", 32, 56, 161, 33)
GUISetState()
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case -3
Exit
Case $Button2
Go()
EndSwitch
WEnd
Func Go()
Local $sInfo = Run('es.exe qq.exe', '', 0, 2), $Stdout
While 1
Sleep(1)
$Stdout &= StdoutRead($sInfo)
If @error Then ExitLoop
WEnd
$ComboData = StringReplace($Stdout, @LF, '|')
$ComboDF = StringRegExpReplace($ComboData, '(.+?)\|.+', '$1')
GUICtrlSetData($Combo1, $ComboData, $ComboDF)
EndFunc ;==>Go
|