Jump to content

Search the Community

Showing results for tags 'stdoutread()'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. Hello, Im trying to capture information from a dos command using StdoutRead() and have it appear in an edit box in my GUI. For some reason when i run the command with a msgbox in the while loop it will transfer the data to the edit box properly. but when i eliminate the msg box from the while loop nothing appears in the edit box. I cant sem to figure out exactly where i am going wrong here. Sample code: #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <inet.au3> #include <Constants.au3> #RequireAdmin #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 623, 449, -815, 111) $User = GUICtrlCreateButton("Who's Logged On", 16, 16, 171, 33) $Host = GUICtrlCreateButton("Get Hostname", 16, 64, 171, 33) $Mac = GUICtrlCreateButton("Get MAC Address", 16, 112, 171, 33) $sUser = GUICtrlCreateInput("", 216, 24, 217, 21) $sHost = GUICtrlCreateInput("", 216, 72, 217, 21) $sMac = GUICtrlCreateInput("", 216, 120, 217, 21) $pInfo = GUICtrlCreateInput("", 448, 168, 169, 21) $Label1 = GUICtrlCreateLabel("Version", 448, 150, 164, 19) $Acc = GUICtrlCreateButton("User Account", 456, 16, 155, 41) $IP = GUICtrlCreateInput("IP/Host Name", 8, 408, 193, 21) $Version = GUICtrlCreateButton("Check Version", 16, 160, 171, 33) $pName = GUICtrlCreateInput("Enter Program", 216, 168, 217, 21) $Ping = GUICtrlCreateButton("Ping", 232, 392, 169, 41) $mDrive = GUICtrlCreateButton("Remote C$", 432, 392, 163, 41) $nPrinter = GUICtrlCreateButton("Mapped Printers", 16, 208, 171, 33) $pList = GUICtrlCreateEdit("", 216, 208, 217, 73) GUICtrlSetData(-1, "Edit1") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $User remote_user() case $Host remote_host() case $Mac remote_Mac() Case $Version remote_program() case $ping ping_customer() case $mDrive map_drive() case $nPrinter get_printers() Case $acc Account() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd func remote_user() $pid= Run(@ComSpec & " /c wmic /node:214.47.41.200 computersystem get username", @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) While 1 $line = StdoutRead($pid) If @error Then ExitLoop MsgBox(0, "STDOUT read:", $line) ;<----- this msgbox i would like to get rid off but code doesnt seem to wrk without it guictrlsetdata($pList, $line) Wend While 1 $line = StderrRead($pid) If @error Then ExitLoop guictrlsetdata($pList, $line) Wend EndFunc thank you to all that help or reply
×
×
  • Create New...