IanN1990 Posted March 15, 2017 Posted March 15, 2017 Hi, I am having some issues displaying the STDOUT Stream within command prompt Eample.exe - Code #AutoIt3Wrapper_Change2CUI=Y sleep(1000) ConsoleWrite("Test") sleep(1000) Cmd Start /Wait C:\Example.exe The command prompt successfully runs and waits for the program to close but doesn't display the console written information? Help file says "The purpose for this function is to write to the STDOUT stream. Many popular text editors can read this stream. Scripts compiled as Console applications also have a STDOUT stream.This does not write to a DOS console unless the script is compiled as a console application." and https://www.autoitscript.com/wiki/AutoIt3Wrapper_Directives shows #AutoIt3Wrapper_Change2CUI (Y/N) Change output program to CUI in stead of GUI. N So where have i gone wrong
water Posted March 15, 2017 Posted March 15, 2017 (edited) When running a slightly modified version of your script (compiled and double clicked in Windows Explorer) it displays the expected values: #AutoIt3Wrapper_Change2CUI=Y Sleep(1000) Global $iDataWritten = ConsoleWrite("Test") Sleep(1000) MsgBox(0, "Result", "Bytes written " & $iDataWritten) Edited March 15, 2017 by water My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
IanN1990 Posted March 15, 2017 Author Posted March 15, 2017 (edited) Just to confirm. When you double click the test.exe it opens up a dos display? As if that is the case. Mine does not :S Edited March 15, 2017 by IanN1990
IanN1990 Posted March 15, 2017 Author Posted March 15, 2017 (edited) I completely uninstalled and reinstalled Autoit 3.5.4 but had the same issue. I found though with SciTE4AutoIt3.exe installed it works as you describe it. Edited March 15, 2017 by IanN1990
water Posted March 15, 2017 Posted March 15, 2017 There is no AutoIt version 3.5.4. Are you talking about the SciTE version? What's the version of AutoIt you run? MsgBox(0, "", @AutoItVersion) Do you run the full SciTE version or the light version that comes with AutoIt? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
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