On Wed, 15 Feb 2006 10:50:00 -0500, Ted Green wrote:
>If someone wants to write a macro with a dialog box which prompts
>for the starting number, increment, etc.,
I don't have the time for a complete macro now,
but here is a prototype for the dialog:
#90=2 // 1 = Block, 2 = whole file
#91=1 // 1 = Begin of File/Block, 2 = cursor pos
#92=1 // 1 = real line numbers, 2 = counter
#93=1 // 0 = no padding 1 = padding
// only of interest with padding enabled (#93=1)
#94=2 // 1 = with leading spaces 2 = with leading 0's
#95=1 // 0 = fixed width dependant on max number (5,10,14 digits)
// 1 = minimized fixed width
// only of interest with #92=2 (counter)
#97=1 // first number
#98=10 // increment
// divider
Reg_Set(92, "=") // a space usually is more appropriate,
// but invisible in the dialog ;-)
Num_Str(#97,90, LEFT) // convert numbers to strings for display
Num_Str(#98,91, LEFT)
#99=Dialog_Input_1(90,"`Line Numbering`,
`This macro inserts line numbers in front of lines of text.`,
`It will do it's work within `,
`() the highlighted block or the`, `.h() whole file`,
`beginning at`,
`() Begin_of_File/Block or`, `.h() current cursor position`,
`The numbers are:`,
`.g() the real line numbers or`, `.h() a counter with`,
`?? first number `,
`?? and increment`,
`The inserted numbers will be`,
`[] padded`,
`.t() with leading spaces or `, `.h() 0's to a fixed `,
`.t[] minimized width,`,
`?? using as divider between number and original line:`,
`[&Ok]`,`[&Cancel]`",
SET+APP+CENTER,0,0)
Christian