Jump to content

Last Line of Code Variable


Recommended Posts

How do I get a script to save the last line # of all the script code into a variable? For example, the first line of a 1,000 line script puts up a message, "There are 1,000 lines of code to run"

Or to allow the use of the actual # of lines as a progress bar control.

Link to comment
Share on other sites

Try using something like this:

#include <File.au3>
$count = _FileCountLines(@ScriptFullPath)
Msgbox(0,"","There are " & $count & " lines in: " & @CRLF & @ScriptFullPath)

UNTESTED

Hopefully that works, please note that this does NOT work in compiled form.

Kurt

Edit* minor correction in script example

Edited by _Kurt

Awaiting Diablo III..

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...