eastmus Posted September 13, 2009 Share 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 Link to comment Share on other sites More sharing options...
water Posted September 13, 2009 Share 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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Confuzzled Posted September 13, 2009 Share Posted September 13, 2009 Are you checking for return codes for every call you make? Post some sample code... Link to comment Share on other sites More sharing options...
eastmus Posted September 13, 2009 Author Share 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 Link to comment Share on other sites More sharing options...
trancexx Posted September 13, 2009 Share 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 Link to comment Share on other sites More sharing options...
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