eastmus Posted September 13, 2009 Posted September 13, 2009 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
water Posted September 13, 2009 Posted September 13, 2009 (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 September 13, 2009 by water My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.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 (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
Confuzzled Posted September 13, 2009 Posted September 13, 2009 Are you checking for return codes for every call you make? Post some sample code...
eastmus Posted September 13, 2009 Author Posted September 13, 2009 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 still strange to me, but oh well ... i commented out about 20 lines with ; thx again, problem solved
trancexx Posted September 13, 2009 Posted September 13, 2009 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 still strange to me, but oh well ...i commented out about 20 lines with ;thx again, problem solvedNo, that's just coincidence. ♡♡♡ . eMyvnE
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now