Jump to content
Sign in to follow this  
eastmus

it works but then again it doesnt ? lol

Recommended Posts

eastmus

my script file in .au3 extension works when i run it as .au3,

but when i compile it to .exe and run it as .exe it says error line -1, subscript array and some nonsense ...

i did use include in my .au3, are there compiling options to make sure the includes are included in the .exe ?

my script must be clean, the syntaxcheckprod shows 0 errors nor warnings and

the .au3 script works flawlessly ...

kinda weird that it wont work after compiling to .exe ...

any ideas?

thanks

Share this post


Link to post
Share on other sites
water

I think it must be something related to the environment the exe is running (different working directory, relative path used to access a file ...) so an array doesn't get populated properly.

It depends on the size of your script but I would insert some "breakpoints" into the script to see where it crashes. Let's say put some

FileWriteLine("C:\temp\AutoIt.txt","Checkpoint for Statement ..."
before and after you access an array.

That should give you an idea where to further drill down.

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
Confuzzled

Are you checking for return codes for every call you make?

Post some sample code...

Share this post


Link to post
Share on other sites
eastmus

I think it must be something related to the environment the exe is running (different working directory, relative path used to access a file ...) so an array doesn't get populated properly.

It depends on the size of your script but I would insert some "breakpoints" into the script to see where it crashes. Let's say put some

FileWriteLine("C:\temp\AutoIt.txt","Checkpoint for Statement ..."
before and after you access an array.

That should give you an idea where to further drill down.

thank you, it seemed to have helped.

i had a big comment block of testing codes and your line pointed out an error in my comments ... lol!

anyways, i deleted all the comments before the actual code and it all worked well in the .exe :D

still strange to me, but oh well ...

i commented out about 20 lines with ;

thx again, problem solved

Share this post


Link to post
Share on other sites
trancexx

thank you, it seemed to have helped.

i had a big comment block of testing codes and your line pointed out an error in my comments ... lol!

anyways, i deleted all the comments before the actual code and it all worked well in the .exe :D

still strange to me, but oh well ...

i commented out about 20 lines with ;

thx again, problem solved

No, that's just coincidence.

♡♡♡

.

eMyvnE

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  

×