Jump to content

xmustaphax

Members
  • Posts

    2
  • Joined

  • Last visited

xmustaphax's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. thanks a lot for the help. and sorry i forgot to past the rest of the code the first part worked like a charm , for the second part " the receiving " part i was counting on using a batch script that call grep.exe and other linux commands binaries to trim the output to get the text between " " then display it in the inputbox as an example the command sender give me this output : completed: result=-1, data="text" i have no idea how the do the trimming in autoit thanks .
  2. 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
×
×
  • Create New...