Sign in to follow this  
Followers 0
ResNullius

Possible Bug with CUI compiled scripts

5 posts in this topic

#1 ·  Posted (edited)

Edit: AutoIt Release v3.2.12.1 & beta v3.2.13.3, Win XP 32

Can 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 by ResNullius

Share this post


Link to post
Share on other sites



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

Share this post


Link to post
Share on other sites

#3 ·  Posted (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 by ResNullius

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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 :)

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0