JonnyThunder Posted January 30, 2009 Posted January 30, 2009 Hello, We use a package delivery system which can feedback the output from scripts run on a target PC. If we were to run a DOS batch file with the following, it would be fed back into the job output of our delivery system.... Echo This is my job output >> %1 Echo for the batch file I just ran >> %1 My question is, what would be the alternative within AutoIT. Is it even possible? I tried ConsoleWrite, but it doesn't work. Thanks in advance, JT
KaFu Posted January 30, 2009 Posted January 30, 2009 Take a look at Run() and $STDOUT_CHILD OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2025-May-18) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16)
KaFu Posted January 30, 2009 Posted January 30, 2009 #include <Constants.au3> Local $foo = Run(@ComSpec & " /c Echo This is my job output && Echo for the batch file I just ran", @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) Local $sStdout, $sStderr While 1 $sStdout &= StdoutRead($foo) If @error Then ExitLoop Wend While 1 $sStderr &= StderrRead($foo) If @error Then ExitLoop Wend MsgBox(0, "Debug", "Output:" & @crlf & $sStdout & @crlf & @crlf & 'ErrorMsg:' & @crlf & $sStderr) OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2025-May-18) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16)
JonnyThunder Posted January 30, 2009 Author Posted January 30, 2009 Ahh it's cool. We figured out the software delivery tool is passing a filename which is used for the output. We can open that file directly and dump the output to it. Cheers for the responses though.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now