if (rectselecting == 1) { $msgBody = "矩形範囲選択では使用できません。"; message $msgBody; goto Quit; } if (selecting == 0) { $msgBody = "全ての行頭から文字列を削除しますか?"; question $msgBody; if (result == 0) { goto Quit; } else { selectall; } } $srBuf = searchbuffer; #srOpt = searchoption; #slNo = seltopy; #elNo = selendy; #clNo = #slNo; $msgBody = "削除する文字列を指定してください。"; $delText = input($msgBody, ""); if ($delText == "") { goto Quit; } escape; while (#clNo < #elNo) { moveto 0, #clNo; #delTxtLen = strlen($delText); $chkText = gettext(0, #clNo, #delTxtLen, #clNo); if ($chkText == $delText) { replacedown $delText, ""; } #clNo = #clNo + 1; } movetolineno 1, #slNo; setsearch $srBuf, #srOpt; goto Quit; Quit: endmacro;