I need the opposite of our colleague. I need a macro to duplicate same line a given number of times. It seems a very easy task, but I'm in troubles.
As I searched, I guess there is no command to open some input window to give the number.
Because I'm not expert to scripts, macro would be the first choice.
Let say, I have this line:
And I want to duplicate it 9 times to have this line in total 10 times in the file.
I tried this:
And macro Dup macro is:
Because I don't know how to stop the macro, I put Eof clause, but I know that it may leads to infinite loop.
I also thought that I could compare clipboard number to stop the macro when incremented number reaches the value, but don't know how again.
How to increment clipboard number?
How to compare it inside the macro?
Is there a way to call an input window?
Any ideas?
As I searched, I guess there is no command to open some input window to give the number.
Because I'm not expert to scripts, macro would be the first choice.
Let say, I have this line:
Code: Select all
The Quick Brown Fox Jumps Over the Lazy Dog
Code: Select all
The Quick Brown Fox Jumps Over the Lazy Dog
The Quick Brown Fox Jumps Over the Lazy Dog
The Quick Brown Fox Jumps Over the Lazy Dog
The Quick Brown Fox Jumps Over the Lazy Dog
The Quick Brown Fox Jumps Over the Lazy Dog
The Quick Brown Fox Jumps Over the Lazy Dog
The Quick Brown Fox Jumps Over the Lazy Dog
The Quick Brown Fox Jumps Over the Lazy Dog
The Quick Brown Fox Jumps Over the Lazy Dog
The Quick Brown Fox Jumps Over the Lazy Dog
Code: Select all
InsertMode
ColumnModeOff
HexOff
Loop 0
IfEof
Key Ctrl+HOME
ExitMacro
Else
PlayMacro 1 "Dup"
EndIf
EndLoop
Code: Select all
InsertMode
ColumnModeOff
HexOff
StartSelect
Key DOWN ARROW
Copy
EndSelect
CancelSelect
Paste
Key DOWN ARROW
I also thought that I could compare clipboard number to stop the macro when incremented number reaches the value, but don't know how again.
How to increment clipboard number?
How to compare it inside the macro?
Is there a way to call an input window?
Any ideas?