#titile=現在のノードをすべて開く function StoreSelection() { return { x0 : document.selection.GetActivePointX(eePosView), y0 : document.selection.GetActivePointY(eePosView), x1 : document.selection.GetAnchorPointX(eePosView), y1 : document.selection.GetAnchorPointY(eePosView), mode : document.selection.Mode, restore : function () { document.selection.SetAnchorPoint(eePosView, this.x1, this.y1); document.selection.SetActivePoint(eePosView, this.x0, this.y0, true); document.selection.Mode = this.mode; } }; } Redraw = false; var sel = StoreSelection(); editor.ExecuteCommandByID(4415);//次のノード editor.ExecuteCommandByID(4416);//前のノード editor.ExecuteCommandByID(4413);//アウトラインを縮小 var y0 = document.selection.GetActivePointY( eePosLogical ); document.selection.LineDown(); var y1 = document.selection.GetActivePointY( eePosLogical ); for (var y = y0 ; y < y1 ; ++y)//このノードの上から下までY座標を移動させる { document.selection.SetActivePoint( eePosLogical , 1, y, false); //editor.ExecuteCommandByID(4414);//アウトラインを展開//座標を移動するだけで自動的に開くので必要ない } sel.restore(); Redraw = true;