MadBoy Posted April 9, 2006 Posted April 9, 2006 (edited) Hey, asking questions again. But lets try it. Is it possible to have instant output to file/log using this little function (dunno where to add it in the code below): Func _AddLineBox($Text) GuiCtrlSetData($LogBox,"["& _NowTime(5) & "] - " & $Text & "|") _GUICtrlListSelectIndex($LogBox, _GUICtrlListCount($LogBox)-1) If $logging_to_file = "Yes" Then $file_log = FileOpen($log_file,1) FileWriteLine($file_log, "["& _NowTime(5) & "] - " & $Text & @CRLF) FileClose ( $file_log ) EndIf EndFunc With this code: If $method = "SetupCopyOemInf" Then ;GUICtrlSetData( $label[24], $gui_line[20],$GUI_SHOW ) Dim $OemInfDataOutput $OemInfOutput = Run(@ComSpec & " /c " & $oeminf & " " & $path_to_drivers, '', @SW_HIDE, 2) While 1 $OemInfData = StdoutRead($OemInfOutput) If @error Then ExitLoop If $OemInfData Then $OemInfDataOutput &= $OemInfData Else Sleep(10) EndIf WEnd $OemInfDataOutput = StringStripWS($OemInfDataOutput, 6); Remove spaces from output $OemOutput = StringSplit($OemInfDataOutput, @CRLF); Split output of devcon into array ;_ArrayDisplay( $OemOutput, "DUPA") $NrCopiedInfs = $OemOutput[0] $DeviceDrivers = "PASSED" EndIf I'm running some external program and it takes a longer while. While it's running a lot of lines are running thru the screen. I would like to have those lines visible in my program (and in log file) as soon as they are run and not as soon as the external program is done. Would appreciate help where i have to add or what i have to change in my code to make it possible. I know the code is missing a lot of code, but posting full code isn't possible at this time. Also when the external program is running and i switch with ALT+TAB to some ther programs and then i go back with ALT+TAB to MyGui it's not responding until external program is done. Any way to fix this? Edited April 9, 2006 by MadBoy My little company: Evotec (PL version: Evotec)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now