// 選択範囲のみ置換 str1 = InputBoxMultiLine("検索文字列を入力してください"); if (str1 == "") { return; } str2 = InputBoxMultiLine("置換文字列を入力してください"); for (y = SelTop; y <= SelBottom; y++) { for (x = SelLeft; x <= SelRight; x++) { [x,y] = replace([x,y], str1, str2); } }