新規行番号入力
新規行番号入力
※最初に使用してください。一度すべてを消去してから入力します。
1. 2. といった行番号を入れるだけのマクロです。99.まで可能です。
//全消去
document.selection.SelectAll();
document.selection.DeleteLeft(1);
var r = new RegExp(prompt("整数2桁までを入力してください", ""));
//値の取得
document.selection.Text = r;
document.selection.Replace("/", "", meFindNext | meReplaceAll);
var h = new RegExp("[0-9][0-9]");
let j = h.exec(r)[0];
document.selection.Replace("[0-9]", "", meFindNext | meFindAround | meFindReplaceRegExp | meReplaceAll);
let x = 0;
for (let step = 0; step < j; step++) {
// 値が 0 から jまで実行される
x = step + 1;
document.selection.Text = x;
document.selection.Text = ".";
document.selection.NewLine(1);
}
スポンサーリンク