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

Flat Previous Topic | Next Topic
Poster Thread
Yutaka
Posted on: 7/12/2010 9:07 am
Webmaster
Joined: 9/28/2006
From: Redmond
Posts: 2397
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/

Flat Previous Topic | Next Topic


Subject Poster Date
   organize text user 7/10/2010 1:40 pm
   » Re: organize text Yutaka 7/12/2010 9:07 am

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