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


Location


WWW


Interests

Found 20 results

  1. Good morning, I am trying to read a Unicode utf8 string from a perl subprocess via StdoutRead. I use an AUtoIt GUI and display result in an 'Edit' control (see my code below) using 'Courier New', a font that can handle Unicode characters. I was expecting a result looking like (CMD console): ++$ chcp 65001>NUL: & perl -Mutf8 -CS -e "use 5.018; binmode STDOUT,q(:utf8); say qq(\x{03A9})" & chcp 850>NUL: Ω Instead I get someting like this (see downward the screen copy): ++$ chcp 1250>NUL: & perl -Mutf8 -CS -e "use 5.018;
  2. I have a Parent Script that starts multiple, concurrent child processes. I cannot figure out how to apply the technique for using StdoutRead in the examples in a way that listens to them all simultaneously. For reference, there can be any even number of, or single, child processes and there is an 1D array, $PIDS, that stores the PIDS of all the child processes and they should be outputting to another 1D array $sOutput. Thank you for your time. Please just point me in the right direction. I'm sorry if I missed another topic that covers this.
  3. Hello, to provide an easy to use starter to capture traffic on all NICs found, I can successfully get all the interfaces of TSHARK.EXE (the command line version that's automatically installed along with wireshark) with this script: #include <AutoItConstants.au3> #include <Array.au3> $TS_WD = "C:\Program Files\Wireshark" $TS_exe = $TS_WD & "\tshark.exe" if not FileExists($TS_exe) Then MsgBox(48,"Fatal Error","No Wireshark Commandline Tool ""TSHARK.EXE"" found:" & @CRLF & _ $TS_exe) Exit
  4. Hey Guys, I have a (i think) simple question, but i can't seem to get the answer though the help-files. Hope that you can help me with this issue. - I am opening a SSH Connection with the following function Func _Connect($session,$usr,$pass) $exec = @ScriptDir & "\PLINK.EXE" If Not FileExists($exec) Then _Err("PLINK.EXE Not Found!",0) $pid = Run($exec & " -load " & $session & " -l " & $usr & " -pw " & $pass, @ScriptDir, @SW_HIDE, 0x1 + 0x8) ;Run SSH.EXE If Not $pid Then _Err(
  5. OK, the odd stuff seems to happen to me. Not sure if this belongs here or in the deployment forum. The Question: Why would the console output results from a command-line tool need to know the working dir on one system but not the other? Though in the end I solved the issue I still am not understanding why StdoutRead seems to behave differently as I describe below. Preamble: Windows 10 image deployment to two different HP workstation hardware platforms. After deployment set up some disk space using Intel RAID. I script the Intel RSTe client (Intel® Rapid Storage Technology enterp
  6. Hi, I'm new. Anyways, I'm using the RunBinary.au3 script by trancexx and I want to re-direct the STDOUT of the "child process" back to the autoit script that launches it. I'm attempting to do so using named pipes. If its possible to use StdoutRead instead of namedpipes please let me know. I'm just unsure of how to provide a handle of the childs STDOUT stream to that function. Though DllCall("kernel32.dll", "ptr", "GetStdHandle", "dword", "STD_OUTPUT_HANDLE") seems to get the handle? Please excuse any foolish mistakes because I'm new to STDOUT, runbinary and namedpipes. Here's the par
  7. #include <Constants.au3> ListLetter() Func ListLetter() ;$DSK = Run("cmd", '', '', $STDIN_CHILD + $STDOUT_CHILD) $DSK = Run(@ComSpec & " /c diskpart.exe start", '', '', $STDIN_CHILD + $STDOUT_CHILD) ConsoleWrite('$DSK - '& $DSK&' - Error - '& @error &' - '&@MSEC&@CRLF) Sleep(2000) $Read = StdoutRead($DSK, True, False) ConsoleWrite(' - '& @error &' - '&@MSEC&@CRLF) ConsoleWrite('StdoutRead ' &$Read&' - '&@MSEC&a
  8. Hi, Background: i have a number of instances of the same application that I want to automate in parallel. Unfortunately, I cannot completely automate these instances in the background. So, from time to time these instances need to have the focus so that I can interact with the controls via “send” directly. Each of the application instances is controlled by a au3 complied script. Each script (called with a parameter) manages the automation of the respective application-instance. Each of the (complied) script (instances) is called by a (central) front end with a gu
  9. $user = "root" $password ="" $host ="5.0.0.1" $port ="22" $puty_exe = @ScriptDir & "\putty.exe"; putty salve local folder script $command = Run(@comspec & " /C "&$puty_exe&" -ssh -l "&$user&" "&$host&" p "&$port&" -pw "&$password,@ScriptDir, @SW_HIDE, 1) While 1 $data = StdoutRead($command) ConsoleWrite($data&@CRLF) If @error Then ExitLoop Wend Why StdoutRead cant read what putty.exe write in console ?
  10. Perhaps someone would benefit off this. I made heavy use of the Help file example. Only question I have here, is is there a better way to do the Regex for finding "error|ERROR|Error" in the source string? Thx Example7zPwd() Func Example7zPwd() ;-- Local $iPID = Run(@ComSpec & " /c DIR Example.au3", @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) Local $iPID = Run(@ComSpec & " /c 7za t -pmasale myzip.zip ", "c:\files\testing", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) Local $sOutput = "" Local $myError = 0 ConsoleWrite("$my
  11. Question regarding StdinWrite and Stdoutread… Here’s my setup… I’m opening a powershell session using the AutoIT Run function with the $STDIN_CHILD and $STDOUT_CHILD optional flags. I’m then sending a command using the STDINWRITE function to connect to a remote server which is a long distance away and it takes a “long” time to return results. I’m then trying to read the STDOUT stream. After this there are other STDINWRITE statements that I need to make so the STREAM hasn’t closed at this point. My question is this…How do I know for sure when all the data has been returned from the remote ser
  12. Hey guys, I want to use Putty/Plink to connect on a remote computer via SSH because I need to execute a couple commands there. So I researched a couple days now and tried like 20 different ways to get this running but I'm still failing. Maybe a little description what my script should do: #Edit: Short version: I need to use StdoutRead to get the DOS command promt output MORE THAN ONCE! The first time is working, but I need to get this the whole time till I say stop ^^ I want to start Putty/Plink and connect via SSH on a remote computer AND I wanna check if there is anything wrong going o
  13.  Whenever I try to run this simple command it does not work with the constants at the end. If I remove the $STDERR_CHILD and $STDOUT_CHILD, the command works but of course I can't capture the text. I've tried many ways. I have the autoconstants include declared also. I looked at other topics in the forum and many are very old but didn't seem to be this scenario. AutoIt ver 3.3.12 Local $get = Run(@ComSpec & " /c ipconfig","",@SW_SHOW,$STDERR_CHILD + $STDOUT_CHILD) While 1 $sOutput = StdoutRead($get) If @error Then ExitLoop
  14. Someone told me I should post this in the examples section. I wrote this to make it easy for me to call a Windows console application and get its output using a single line of AutoIt code. I hope it's helpful to someone else. #include <Constants.au3> ; Examples: MsgBox(0,"Windows Version",_RunWaitGet(@ComSpec & " /c ver",1,"",@SW_HIDE)) MsgBox(0,"System Info",_RunWaitGet(@SystemDir & "\systeminfo.exe",1)) ; #FUNCTION# ==================================================================================================================== ; Name ..........: _RunWaitGet ; Descrip
  15. Dear Autoit Forum, Before I start, I have checked the following topics, but couldn't get far enough: '?do=embed' frameborder='0' data-embedContent>> Func _PLINK_Connect($remote, $user, $password) Local $hSessionPID = Run("plink.exe -ssh " & $remote & " -l " & $user & " -pw " & $password, "", @SW_HIDE, $STDIN_CHILD + $STDOUT_CHILD) If @error Then MsgBox(0, "Error: xxx", "Running plink.exe under the main folder failed.") Return False EndIf Local $sLine While True ;read each line $sLine = StdoutRead($hSessionPID) ;ty_DEBUG print e
  16. Is there any way to retrieve the exit code from a process while also being able to use StdoutRead/StderrRead?
  17. I have a script that executes powershell commands to interact with Office 365(Microsoft hosted Exchange service). I want to hide the powershell window and interpret the output silently, so that non-savvy users can reset passwords and such without having to learn powershell or understand its errors. However, when I use: Func RunCommand($commandtorun) $output = "" If WinExists("Administrator:") Then WinActivate("Administrator:") Send($commandtorun & "{ENTER}") While 1 $output &= StdoutRead($pwshell) If @error Then ExitLoop WEnd MsgBox(0, "std
  18. I found this topic: but it doesn't seem to solve my problem. I'm trying to create a script to help my guys provision new Cisco switches for deployment. I was hoping to find a nice, easy way to send data over a serial connection (similar to TCPSend), but alas. I read a lot about mscomm32.ocx and netcomm.ocx, but there seem to be licensing issues. Plink seems to be a good bet, but my attempts at reading the output are not working. If I run plink manually, (to an unconfigured switch) I get a Switch>_ prompt. But when I run the same command here, my stdoutread loop never ends. Any way
  19. What I am attempting to do is use AutoIt to read and write to the minecraft (bukkit) console The console itself comes up as a cmd window when you start the jar with a .bat file. So far I have been able to read FROM StdoutRead, but I have had less success writing TO the console and getting any kind of response. Here is the server, example .bat file, and the following script: #include <GuiEdit.au3> OnAutoItExitRegister("close") hotkeyset("{ENTER}","enter") $GUI = GUICreate("MC Console Wrapper", 514, 251, 192, 124) $Edit = GUICtrlCreateEdit("", 8, 8, 497, 209, 2101312) $Input = GUICtrlCr
  20. I'm using to upload a file to a server. After the upload the server returns a URL to that file. My program needs to give that URL to the user. libcURL is working fine and the upload is successful, and the HTML response needed is output to scite's console. I need the information put into the console to be stored in a variable, though, and I can't figure it out. I think I need to use stdout or stdread to do this. I have used these before when using a run() command but this library is using a dll (and is much cleaner than my previous version which used run commands). How do I record the outpu
×
×
  • Create New...