maniootek

Compiled script error with console messages

5 posts in this topic

When I run any of my code I prefer to do it from Scite Script Editor as I can get line number and information about error when code fail. This is not happening when I get error on compiled script. Any idea to change error message on compiled scripts?

Share this post


Link to post
Share on other sites



Hi, maniootek. Can you elaborate on "change error message on compiled scripts"? Are you asking about the line numbers being off when you compile the script, or are you looking for something else?


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

@JLogan3o13

Can I speak to my countryman ?
Of course here on the forum , in English language.
As I think I know what he mean.

mLipok

EDIT: 
Oh... I see @JLogan3o13 is offline.

so...

@maniootek here you can read about reason:

https://www.autoitscript.com/autoit3/docs/macros.htm

@ScriptLineNumberLine number being executed - useful for debug statements (e.g. location of function call). Only significant in uncompiled scripts - note that #include files return their internal line numbering

 

You can use workaround, for detailed info search in the following links:

http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3.html
http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/Au3Stripper.html

/rsln
Replace @ScriptLineNumber with the actual line number for source debug purposes with compiled scripts.

 

Cheers,

mLipok

Edited by mLipok

Wondering who uses AutoIT and what it can be used for ?


ADO.au3 UDF     POP3.au3 UDF     XML.au3 UDF    How to use IE.au3  UDF with  AutoIt v3.3.14.x  for other useful stuff click the following button:

Spoiler

Last update: 2017-03-27
Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAPPOP3.au3 UDF *  RTF Printer - UDF * XML.au3 - BETA * ADO.au3 UDF SMTP Mailer UDF * WinSCP UDF *

My contribution to others projects: * _sql.au3 UDF  *

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Best coding practices * 

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities *

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

 

Share this post


Link to post
Share on other sites

I am afraid you both didn't understand my problem. I will try to give more details about it.

All I want to achieve is to receive error message with the same error description as console do when my code gets error during execution from SciTe

Sometimes I run my scripts directly from SciTe and sometimes from compiled exe file. The difference is that if code fail (get error) during execution (when it working) SciTe will give me detailed info about this error which is much more accurate than error message received from compiled exe file. Check pictures please.

 

autoiterror.png

autoiterror2.PNG

Share this post


Link to post
Share on other sites

You won't receive the same error since aut2exe will merge the source together into a single "file".
You could achieve the same by using au3stripper and us the /MergeOnly option, which will produce a similar file as is included the the compiled EXE.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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