Jump to content

Line Numbers in AutoIt Error Messages


JoachimR
 Share

Recommended Posts

Does anybody have a suggestion on how I can get the reported line number (here "Line 17266") for an AutoIt runtime error
in a compiled program converted to something more useful? The line number is obviously due to the concatenation of all referenced
includes. Maybe there is a way to get a base number for the real program?

error.PNG

Link to comment
Share on other sites

  • Moderators

  JoachimR.

Use Au3Stripper with the /MergeOnly flag to get the file as passed to Aut2Exe - then the line numbers will match. See SciTE help for more full details.

But better still - debug the script and prevent the error by adding some form of errorchecking code.

M23

Edited by Melba23
Added advice!

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • 4 months later...

I got an error message on a program that has only 6692 lines of script - sent to me by a colleague. Line 12068 Error: Variable used without being declared.

I tried running Au3Stripper and got the following error

- ### C:\Program Files (x86)\AutoIt3\SciTE\Au3Stripper\Au3Stripper.dat missing... Please get it from the website to make sure the Au3Stripper will work correctly.

Where do I get this file?

I got a stripped file but it deleted 11 of my functions, not all, and then complained that they weren't there.. Will the dat file fix that?

Blessings

Graeme

Link to comment
Share on other sites

  • Developers

How did you install au3stripper and how are you running it?

You haven't followed the instruction given in Melba23's post when Funcs/Variables are removed.

On 9/29/2015 at 6:28 PM, Melba23 said:

Use Au3Stripper with the /MergeOnly flag

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • 2 weeks later...
  • Developers

Well, when the dat file is missing it can only mean something go missing as the installer puts it in the right spot.
Try re-installing the Full SciTE version with the installer and ensure you run it with your regular account as files are copied to your %LOCALUSERDATA% directory.

Jos

 

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

I reinstalled SciTE and reran Au3Stripper and got the following on the console.  I installed and ran it in the same account.

Running Au3Stripper (15.920.938.0)  from:C:\Program Files (x86)\AutoIt3\SciTE\Au3Stripper cmdline:
- ### C:\Program Files (x86)\AutoIt3\SciTE\Au3Stripper\Au3Stripper.dat missing... Please get it from the website to make sure the Au3Stripper will work correctly.
+> 0 Au3Stripper v15.920.938.0 finished merging 22142 lines of code, stripped 9659 comment lines and Merged 343 Continuation lines.
+>        Created:U:\Documents\*****\QA files\QuickAccess2.3.4\QuickAccess2.3.4 To strip_stripped.au3 with 12140 lines.
+>12:29:13 Au3Stripper ended.rc:0

I then had 13 undefined functions which ran well in the unstripped version.

When I compile without the /MergeOnly setting it compiles without error.

Blessings

Link to comment
Share on other sites

I found Au3Stripper.dat in my Admin user account - to install the SciTE you have to change to user of course... I copied it to the C:\Program Files (x86)\AutoIT3\SciTE\Au3Stripper folder and it worked - better.

Then I realised that the point where it was dropping functions was where I found

#ce______________________________________________________________

and I changed it to

#ce ______________________________________________________________

and it worked better.

It only had one function dropped.

Then I found #_____________________________________________________

I deleted this and now it works. I think these may have been options that used to work and now don't - at least as far as Au3Stripper is concerned -

Fixed:) Thanks for all your comments!

Blessings

Graeme

Link to comment
Share on other sites

I always imagined that when the program is loaded into memory, anything that gets loaded externally is placed in there as well. Aside from includes, I mean if you are reading from another file or data source. Most of the times I ever see line numbers well beyond what is actually present in the EXE is when the program creates an array.

Link to comment
Share on other sites

On 9/29/2015 at 0:28 PM, Melba23 said:

  JoachimR.

Use Au3Stripper with the /MergeOnly flag to get the file as passed to Aut2Exe - then the line numbers will match. See SciTE help for more full details.

But better still - debug the script and prevent the error by adding some form of errorchecking code.

M23

I've always wondered about this issue. Thanks for pointing this out.

 

 

Link to comment
Share on other sites

Did anyone notice that Au3Stripper handled #________________________________________ and #ce___________________________________ differently from Au2exe?

Could this be classed as a bug in Au3Stripper?

I know I had problems once before where the compiler would compile the program which would run but if I ran it with SciTE it would produce errors..:( This was because of lines that were #_____________________________________________________________ which were used, erroneously(?) to divide the script up, as far as I could see.

Blessings

Graeme

Link to comment
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
 Share

×
×
  • Create New...