EmEditor (text editor) Forum Index
   Macro Samples
     Activate Next Group macro
Register To Post

Threaded | Newest First Previous Topic | Next Topic | Bottom
Poster Thread
Yutaka
Posted on: 3/29/2008 10:18 am
Webmaster
Joined: 9/28/2006
From: Redmond
Posts: 2398
Activate Next Group macro
The Next Group command was missed feature on and before Version 7. While this command should be included in future versions of EmEditor, use this macro before it is included in the EmEditor core.


bFirst = true;
wnds = new Enumerator( shell.windows );
for( ; !wnds .atEnd(); wnds.moveNext() ){
    wnd = wnds.item();
    if( wnd && wnd.className == "EmEditorMainFrame3" ){
        if( !bFirst ){
            wnd.SetForeground();
            break;
        }
        bFirst = false;
    }
}


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

Yutaka
Posted on: 3/29/2008 7:02 pm
Webmaster
Joined: 9/28/2006
From: Redmond
Posts: 2398
Activate Previous Group macro
If you have more than two groups, you might need this macro to jump to another group.


wnds = shell.windows;
nMax = wnds.Count;
for( i = nMax; i > 0; i-- ){
    wnd = wnds.Item( i );
	if( wnd && wnd.className == "EmEditorMainFrame3" ){
    	wnd.SetForeground();
        break;
    }
}


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

Threaded | Newest First Previous Topic | Next Topic | Top


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