クリップボードに入っている文字列を
選択した範囲の行頭につけ加える。
毎回キーボードマクロで指定していたのですが、
面倒だし遅いのでスクリプトにしてみました。
※このWikiにマクロを登録すること自体に使えるw
ActivePointX = document.selection.GetActivePointX(eePosView); ActivePointY = document.selection.GetActivePointY(eePosView); AnchorPointX = document.selection.GetAnchorPointX(eePosView); AnchorPointY = document.selection.GetAnchorPointY(eePosView); //選択範囲の端点とカーソル位置のどちらが小さい(左上)か bGreater = document.selection.IsActiveEndGreater; document.selection.Replace( "^", clipboardData.getData("Text"), eeFindReplaceRegExp|eeReplaceSelOnly|eeReplaceAll ); if(bGreater) document.selection.SetAnchorPoint(eePosView, AnchorPointX, AnchorPointY); else document.selection.SetAnchorPoint(eePosView, ActivePointX, ActivePointY);