Jump to content

Recommended Posts

Posted (edited)

Debug-console version of AutoIt3.exe and AutoIt3_x64.exe?


I want to test my script (it already passes Au3Check.exe) by running it through CMD,

and I want any errors (crashes, syntax errors, array index issues, invalid assignments, etc.) to be printed directly to the console instead of stopping the program and showing an error message box.
Those pop-up error dialogs make debugging difficult because I have to switch back to SciTE every time.

What I’m asking for is a console-mode debug version of AutoIt3.exe/AutoIt3_x64.exe that, when an error occurs, prints the error to the console and exits immediately with a non-zero exit code.

 

And with compiled scripts too, is it possible to print a message on console instead of showing it?

Edited by Trong

Enjoy my work? Buy me a 🍻 or tip via ❤️ PayPal

Posted

SciTE don't get those popups. They run with "/ErrorStdOut."
Then you also have Opt("SetExitCode",1) 1 = Set @exitCode on Fatal error - see Exitcodes.

If that is not enough then, let me know.

P.S.: I really like the open source code you're integrating. Like really really like it. Thanks for that 💯

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Posted
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Icon=Icons\au3script_v9.ico
#AutoIt3Wrapper_Outfile=Autoit3cui.exe
#AutoIt3Wrapper_Outfile_x64=AutoIt3_x64cui.exe
#AutoIt3Wrapper_Compile_Both=y
#AutoIt3Wrapper_UseX64=y
#AutoIt3Wrapper_Change2CUI=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.3.16.1
 Author:         myName

#ce ----------------------------------------------------------------------------

; Script Start - Add your code below here

FileChangeDir(@ScriptDir) ; my AutoIt is installed there

Opt("TrayAutoPause", 0) ; Script pauses when click on tray icon = OFF/0
Opt("TrayOnEventMode", 0) ; Enable/disable OnEvent functions notifications for the tray = OFF/0
Opt("GUICloseOnESC", 1) ; When ESC is pressed on a GUI the $GUI_EVENT_CLOSE message is sent = ON/1

#pragma compile(Console, True)
#pragma compile(AutoItExecuteAllowed, True)

..also used the above and instead of running a script with AutoIt3.exe, I would run it with Autoit3cui.exe
If these cui versions are in the same folder as AutoIt3.exe, all will be running just fine.

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...