EmEditor (text editor) Forum Index
   Questions and Answers about EmEditor Core
     organize text
Register To Post

Threaded | Oldest First Previous Topic | Next Topic | Bottom
Poster Thread
Yutaka
Posted on: 7/12/2010 9:07 am
Webmaster
Joined: 9/28/2006
From: Redmond
Posts: 2424
Re: organize text
Hi 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();
	}
}


----------------
Yutaka Emura
Developer of EmEditor
http://www.emeditor.com/

user
Posted on: 7/10/2010 1:40 pm
Home away from home
Joined: 9/29/2006
From:
Posts: 212
organize text
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, etc

to 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
Threaded | Oldest First Previous Topic | Next Topic | Top


Register To Post
 
English čeština Deutsch español français italiano 日本語 한국어 Русский 简体中文 繁體中文