Gubba1 Posted May 23, 2011 Share Posted May 23, 2011 Used very successfully the @ScriptLineNumber in my 1042 line script to write out the line number to my logfile. After making a few minor changes (<20 new or updated lines), now @ScriptLineNumber is returning -1 (negative one) for all calls to it. I copied the first few 100 lines of code or so, compiled and found @ScripLineNumber then works fine. I am a loss what to do, other than throw today's work away. Any thoughts or suggestions? P.S. One can not search these forums for "-1" (with or without quotes) for the results always state: "No results found for '1'." Link to comment Share on other sites More sharing options...
Gubba1 Posted May 23, 2011 Author Share Posted May 23, 2011 Compiled a version of the code from last Thursday that was working as expected. After today's compilation it is broke too. Link to comment Share on other sites More sharing options...
water Posted May 23, 2011 Share Posted May 23, 2011 The help file states for @ScriptLineNumber: "(Not significant in complied script)" I never got anything else than -1 from a compiled script (but I don't use it very often). 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...
Gubba1 Posted May 23, 2011 Author Share Posted May 23, 2011 Based on the previous comment and some additional experimentation, I've figured out my issue. When I run the script from within the Scite editing environment via the F5 (Go) key, I get line numbers appearing in the log file as expected. When I run the compiled .EXE (e.g., activating from MS Windows Explorer), I get the "-1" as the Help indicates. Drat - wish there was some way to get line numbers all the time, regardless of what is being run where, even if this meant a script that ran slower or needed additional configuration. Link to comment Share on other sites More sharing options...
ProgAndy Posted May 23, 2011 Share Posted May 23, 2011 @ScriptLineNumber only returns a valid number when you run the uncompiled .au3 like SciTe does. You can execute the .au3 from Explorer, too and the numbers will show. Only with the exe it does not work. *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes 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