am a noob and i made a little program to send commands to a device via usb by sending arguments to a command line tool
am having trouble in two things
1- first sending what i type into the input box and inserting in the command in place of the word HELLO between ' ' when clicking on send button.
2- second clearing the input and receiving the output as text also and displaying it in the input box when clicking on receive button.
;the UI
Global $cmd = GUICtrlCreateGroup("command sender", 13, 407, 340, 80)
Global $instcmdsnd = GUICtrlCreateButton("setup", 25, 422, 100, 25)
GUICtrlSetFont(-1, 8.5, 400, 0, "Segoe UI", 5)
GUICtrlSetOnEvent(-1, "setcmd")
Global $sendcmd = GUICtrlCreateButton("send", 133, 422, 100, 25)
GUICtrlSetFont(-1, 8.5, 400, 0, "Segoe UI", 5)
GUICtrlSetOnEvent(-1, "gocmd")
Global $getcmd = GUICtrlCreateButton("receive", 242, 422, 100, 25)
GUICtrlSetFont(-1, 8.5, 400, 0, "Segoe UI", 5)
GUICtrlSetOnEvent(-1, "getcmd")
Global $cmdInput = GUICtrlCreateInput("", 25, 455, 318, 22)
;the function
Func setcmd()
Run(@ComSpec & " /c c:\mytool\bin\commandsender.exe start ", @ScriptDir, @SW_HIDE, $stderr_child + $stdout_child)
EndFunc
Func gocmd()
Run(@ComSpec & " /c c:\mytool\bin\commandsender.exe send -t 'HELLO' ", @ScriptDir, @SW_HIDE, $stderr_child + $stdout_child)
EndFunc
Func getcmd()
Local $get = RunWait("c:\mytool\bin\response.bat", @ScriptDir, @SW_HIDE)
EndFunc
thanks in advance