Page 1 of 1

Return the current line number.

Posted: Fri Jan 18, 2008 6:05 pm
by Bob Hansen
Could really use the ability to get the current line number.

Could this be added to Insert Stats info, so that the current line shows on the line where the specs are inserted? Example:

Edit/Insert/Statistics would return something like this:
172409 characters, 25530 words, 5178 lines, 3144 current.

I can then parse that value out as needed for some calculations.
Would also be nice in Options to determine which specs would be returned vs. all of them.

Thanks for listening.

Posted: Fri Jan 18, 2008 10:47 pm
by ben_josephs
This tool will send the current line number to the Tool Output window:
Command: cmd
Parameters: /c echo $line

[X] Run minimized
[X] Capture output
If you have 4NT, this tool will put the current line number on the clipboard:
Command: C:\4NT\4nt.exe
Parameters: /c echos $line > clip:

[X] Run minimized
[X] Closee DOS window on exit
If you have Perl, this tool will put the current line number on the clipboard:
Command: C:\Perl\bin\perl.exe
Parameters: -MWin32::Clipboard -e "Win32::Clipboard->Set($line)"

[X] Run minimized
[X] Closee DOS window on exit