Sign in to follow this  
Followers 0
eastmus

it works but then again it doesnt ? lol

5 posts in this topic

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



#2 ·  Posted (edited)

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 (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

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

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

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  
Followers 0