ResNullius Posted June 26, 2008 Share Posted June 26, 2008 (edited) Edit: AutoIt Release v3.2.12.1 & beta v3.2.13.3, Win XP 32Can someone please confirm this behaviour? And if so, is it probably a bug or a limitation of CUI compiled scripts?The following script when run uncompiled behaves as expected, you are greeted with the "Press any key to continue" message.But when compiled and run, it displays the message and immediately returns from the batch file without waiting for the key press.#Region;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Change2CUI=y #EndRegion;**** Directives created by AutoIt3Wrapper_GUI **** $tmpBatFile = FileOpen("tmpBatFile.cmd",2) FileWriteLine($tmpBatFile,"@Pause") FileClose($tmpBatFile) RunWait("tmpBatFile.cmd") ConsoleWrite("Done" & @CRLF)The behaviour is the same even if you take out the ConsoleWrite().Don't think it's a problem with the keyboard buffer, because on a different script that waits for user input via a batch file, I get an error like there was no input, whereas run on its own (from a cmd prompt) the batch file doesn't error even if you just hit return without any input.Any elucidation would be helpful before I go posting on the bug trac.Thanks Edited June 26, 2008 by ResNullius Link to comment Share on other sites More sharing options...
Danny35d Posted June 26, 2008 Share Posted June 26, 2008 I just tried your script example and run fine from SciTe and the compiled version, but then I notice I was using AutoIt 3.2.10.0 At soon I downloaded the latest version AutoIt 3.2.12.1 I have the same behaviour it displays the message and immediately returns from the batch file without waiting for the key press. AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line Link to comment Share on other sites More sharing options...
ResNullius Posted June 27, 2008 Author Share Posted June 27, 2008 (edited) I just tried your script example and run fine from SciTe and the compiled version, but then I notice I was using AutoIt 3.2.10.0 At soon I downloaded the latest version AutoIt 3.2.12.1 I have the same behaviour it displays the message and immediately returns from the batch file without waiting for the key press.Thanks. I'll re-install 3.2.10.0 to test.Then onto bug trac if I get the same results.Edit: You're right, works fine under 3.2.10.0, but nothing later.Have opened a bug trac ticket. Edited June 27, 2008 by ResNullius Link to comment Share on other sites More sharing options...
martin Posted June 27, 2008 Share Posted June 27, 2008 Thanks. I'll re-install 3.2.10.0 to test. Then onto bug trac if I get the same results. Edit: You're right, works fine under 3.2.10.0, but nothing later. Have opened a bug trac ticket. This works in Production 3.2.12.1 and Beta 3.2.13.3 compiled or not $tmpBatFile = FileOpen("tmpBatFile.bat",2) FileWriteLine($tmpBatFile,"@Pause") FileClose($tmpBatFile) ShellExecuteWait("tmpBatFile.bat") ConsoleWrite("Done" & @CRLF) Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
ResNullius Posted June 27, 2008 Author Share Posted June 27, 2008 This works in Production 3.2.12.1 and Beta 3.2.13.3 compiled or not $tmpBatFile = FileOpen("tmpBatFile.bat",2) FileWriteLine($tmpBatFile,"@Pause") FileClose($tmpBatFile) ShellExecuteWait("tmpBatFile.bat") ConsoleWrite("Done" & @CRLF)http://www.autoitscript.com/forum/index.ph...st&p=543082 Link to comment Share on other sites More sharing options...
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