- AuthorPosts
- July 10, 2010 at 9:40 pm #8735userParticipant
hello
I don’t know if it is easy to do what I want or there is a tool already available… well, I have a text file with a list of sentences (each sentence seperated with a newline)
what I want is to group/organize the sentences, by cutting them and pasting them to specific text files (other that the one with the sentences list)
so I want to automatically select a sentence, cut it, and paste it in the appropriate text file by clicking a shortcut key
then select the next one, cut and paste it in the appropriate text file, etcto choose the appropriate target text file, where I want each sentence to go, I must click the relevant shorcut key
that would be very handy for this kind of job, any suggestion??
thanks
July 12, 2010 at 5:07 pm #8737Yutaka EmuraKeymasterHi user,
This is an example of a JavaScript macro:
sText = document.selection.Text;
if( sText != "" ) {
menu = CreatePopupMenu();
nCount = editor.Documents.Count;
for( i = 1; i <= nCount; i++ ){
doc = editor.Documents.Item( i );
if( doc != document ){
menu.Add( doc.FullName, i );
}
}
result = menu.Track( 0 );
if( result != 0 ) {
docOrg = document;
doc = editor.Documents.Item( result );
doc.Activate();
document.selection.EndOfDocument();
document.selection.Text = sText;
docOrg.Activate();
document.selection.Delete();
}
}
- AuthorPosts
- You must be logged in to reply to this topic.