Jump to content

Trying to find error


Recommended Posts

I am brand new to AutoIt3, I have a script that is meant to dump the NTFS $MFT (Master File Table). It compiles with no errors but when I execute the program created I get this in a dialog:

Line 21644 (File "C:\Users\Devon\Documents\MFT Project\NTFS_Sysfiles_Extracter_v1.8\MFTDump.exe");

Error: Array variable has incorrect number of subscripts or subscript dimension range exceeded.

The script source is 2482 lines, I am wondering if there is any correlation between Line 21644 and a line in the source.

Using the AutoIt Debugger (Version 0.45.0.36843), I see no window open, only this in the Output pane of the debugger:

>Running AU3Check (1.54.22.0) from:C:\Program Files (x86)\AutoIt3

+>09:08:32 AU3Check ended.rc:0

>Running:(3.3.8.1):C:\Program Files (x86)\AutoIt3\autoit3_x64.exe "C:\Users\Devon\Documents\MFT Project\NTFS_Sysfiles_Extracter_v1.8\MFTDump.au3"

+>09:08:34 AutoIT3.exe ended.rc:0

Cheers,

Devon

Link to comment
Share on other sites

  • Moderators

DevonNullman,

Your script may only have 2482 lines, but you no doubt have some include files which increase the total number considerably. :D

I take it you have tried running this from within SciTE to see if the same error pops up? ;)

If it only appears when compiled, try running Obfuscator on your script with the /mergeonly parameter - then you will get a fully merged file where the line number reflects the error line. Once you have fixed the problem, you can return to your normal Obfuscator settings. :)

M23

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

Run your code from scite4autoit editor, it will give the true line in the console window.

I assume you mean "Go" (F5) ?

This is what I get from that command:

>"C:Program Files (x86)AutoIt3SciTE..autoit3.exe" /ErrorStdOut "C:UsersDevonDocumentsMFT ProjectNTFS_Sysfiles_Extracter_v1.8MFTDump.au3"

>Exit code: 0 Time: 2.980

Link to comment
Share on other sites

DevonNullman,

Your script may only have 2482 lines, but you no doubt have some include files which increase the total number considerably. :D

I take it you have tried running this from within SciTE to see if the same error pops up? ;)

If it only appears when compiled, try running Obfuscator on your script with the /mergeonly parameter - then you will get a fully merged file where the line number reflects the error line. Once you have fixed the problem, you can return to your normal Obfuscator settings. :)

M23

I obfuscated the script, using /mergeonly and the line number for the error changed of course to line #26972

That line in the obfuscated code reads as follows:

$A552328035C = ''

It is declared as local - Local $A552328035C and is used in a few places as a number:

If $A552328035C = StringLen($A3F13780431) Then

$A552328035C = Number($A1333482F5A)

Else

$A552328035C += Number($A2833581254)

EndIf

So I am still completely lost, been trying to match the obfuscated code to the plain code but so far no luck.

Link to comment
Share on other sites

As far as I can see Obfuscator just has a "/striponly" option but not a "/mergeonly".

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

As far as I can see Obfuscator just has a "/striponly" option but not a "/mergeonly".

I put these 2 lines at the top of the script below "#Region"

#Autoit3Wrapper_Run_Obfuscator=y ;Run Obfuscator before compilation. default=n

#Obfuscator_Parameters= /mergeonly

Edited by DevonNullman
Link to comment
Share on other sites

  • Moderators

DevonNullman,

That snippet of your Obfuscated file looks as if it has been properly obfuscated - /mergeonly should not convert your variables like that. I have just tested and it does not for me. :)

Perhaps you do not have the latest beta Obfuscator version with the /mergeonly code and so are doing a standard obfuscation because the new parameter is not recognised - you can download the latest version here. ;)

M23

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

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

  • Recently Browsing   0 members

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