- AuthorPosts
- February 16, 2009 at 2:52 am #6916DavidParticipant
Can anyone help me?
I need a plugin to duplicate selection as specified times. I only have poor knowledge about javascript.Before this, I create a macro as the following:
sCount = prompt( “Enter the times of duplication:”, “5” );
if( sCount == “” )
{
Quit();
}for(var i=0;i
{
document.selection.DuplicateLine();
}
This macro can’t work as my expection. When 2 rows are selected and enter “3” for times. 40 rows, instead of required 6 rows are generated.
Thanks in advance.February 16, 2009 at 9:32 pm #6917Yutaka EmuraKeymasterDavid wrote:
Can anyone help me?
I need a plugin to duplicate selection as specified times. I only have poor knowledge about javascript.Before this, I create a macro as the following:
sCount = prompt( “Enter the times of duplication:”, “5” );
if( sCount == “” )
{
Quit();
}for(var i=0;i<sCount;i++)
{
document.selection.DuplicateLine();
}
This macro can’t work as my expection. When 2 rows are selected and enter “3” for times. 40 rows, instead of required 6 rows are generated.
Thanks in advance.I changed a little bit.
sCount = prompt( "Enter the times of duplication:", "5" );
if( sCount == "" )
{
Quit();
}
s2 = "";
s = document.selection.Text;
for(var i=0;i<sCount;i++)
{
s2 += s;
}
document.selection.Text = s2;
February 18, 2009 at 6:44 am #6924DavidParticipantHi,Yutaka,A lot thanks to you!
- AuthorPosts
- You must be logged in to reply to this topic.