Sign in to follow this  
Followers 0
BigDaddyO

Display Current Code Line #

6 posts in this topic

Hello all,

I have a fairly large script "3412 Lines" that I am working on and I have a progress box displaying throughout the process that says what it's doing at that point in time. What I would like to do is find some automated way to find out what line of code it is currently running and add that to the progress box. So if anything goes wrong after it's compiled I will know exactly what line to look at.

Thanks,

Mike


Share this post


Link to post
Share on other sites



Hello all,

I have a fairly large script "3412 Lines" that I am working on and I have a progress box displaying throughout the process that says what it's doing at that point in time.  What I would like to do is find some automated way to find out what line of code it is currently running and add that to the progress box.  So if anything goes wrong after it's compiled I will know exactly what line to look at.

Thanks,

Mike

<{POST_SNAPBACK}>

Check out this script written by pekster: #23221

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Hello all,

I have a fairly large script "3412 Lines" that I am working on and I have a progress box displaying throughout the process that says what it's doing at that point in time.  What I would like to do is find some automated way to find out what line of code it is currently running and add that to the progress box.  So if anything goes wrong after it's compiled I will know exactly what line to look at.

Thanks,

Mike

<{POST_SNAPBACK}>

AutoItSetOption("TrayIconDebug",1)

"I'm not even supposed to be here today!" -Dante (Hicks)

Share this post


Link to post
Share on other sites

both the AutoItSetOption("TrayIconDebug",1) and the Debugger by pekster only seem to figure out the line numbers if you are running the au3 file. once it's compiled into the exe they can't figure out the line number :ph34r: . Any other ideas?


Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

both the AutoItSetOption("TrayIconDebug",1) and the Debugger by pekster only seem to figure out the line numbers if you are running the au3 file.  once it's compiled into the exe they can't figure out the line number :ph34r: .  Any other ideas?

<{POST_SNAPBACK}>

This is not the case. Just to make sure, I tested both methods (the icon debug indicator, and my Debug routine.) Both methods worked just fine in the compiled script, as they should.

If you wish to echo the current line in progress to an indicator, you can probably use my Debugger function to automatically make calls to the debugger function, and just change my function around a bit to store to a global variable indicating which line it got finished doing. It shouldn't be too hard to make sense of the debug script created since my function adds in a debugger call between every line.

Minor grammar edit

Edited by pekster

[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

Share this post


Link to post
Share on other sites

@pekster, He is looking for something that will tell him what line the script had an error at. In a compiled au3, the lin number always says 0.

@MikeOsdx, you need to look at the log that is created by pekster's script to see what the last line executed was. The next line is usually the one that messed up. You can also use tylo's au3check to find most errors before compiling.


Who else would I be?

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