Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Capturing output stream from console app
#7
I was running an older version of QM, thank you for this!
The function works but I still can't get the de output streamed into the rich editfield.
It outputs everything after 'console2.exe' is finished. (or it seems that way?)

I am probably using the function and/or callback function wrong.

See code below:

Function curl_output_test2
Code:
Copy      Help
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 572 194 "Dialog"
;3 Button 0x54032000 0x0 177 12 132 22 "start"
;5 RichEdit20A 0x54233044 0x200 5 44 562 149 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2040A00 "*" "" "" ""


str controls = "5"
str re5
if(!ShowDialog(dd &sub.DlgProc &controls)) ret


#sub DlgProc
function# hDlg message wParam lParam

sel message
,case WM_INITDIALOG
,,ExeOutputControl id(5 hDlg)
,,int- main_dlg;main_dlg=hDlg
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
,case 3
,,int ec=RunConsoleCallback(&sub.OnConsoleOutput 0 "$my qm$\console2.exe /ab cd")
ret 1

#sub OnConsoleOutput
function# cbParam $s
out F"<{s}>"


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)