drlava Posted September 6, 2007 Share Posted September 6, 2007 Usually autoit returns -1 for a script line on an error. Is there a way I can set it to return a valid line sumber on a compiled script? thanks. Link to comment Share on other sites More sharing options...
evilertoaster Posted September 6, 2007 Share Posted September 6, 2007 hum, I'm thinking maybe if you put some sort of com wrapper around it you migh tbe able to use the com error functionality to d osomthing like that. I almost want to say this has been done before but i wasn't able to find anything when i serached for it. Either way i think when autoit crashes it gives the line number in it's error report doesn't it? Link to comment Share on other sites More sharing options...
Zedna Posted September 6, 2007 Share Posted September 6, 2007 (edited) I got this Line:-1 error some times too. It was when I was testing Project manager and there was bug so it created EXE file with double declared constants. #include <GUIConstants.au3> Const $a = 1 Const $a = 2 GUICreate("My GUI") GUISetState (@SW_SHOW) While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend When compiling click on Continue button in Au3Check error dialog and run output EXE. This error occurs: Line-1: Error: Can not redeclare a constant. Edited September 6, 2007 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
drlava Posted September 7, 2007 Author Share Posted September 7, 2007 Yeah, it gives the proper line number if the script is run from SciTe, but if compiled, it can't return a line number. Line numbers in compiled apps would be helpful in debugging COM/DOM funcationality in public progrmas where the (somewhat rare) error is created from a problem outside of the autoit script. In that case, it's usually hard for me to recreate the error, and hard for me to tell the user to download autoit and run the program from source in order to get the problematic line. 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