|
// こんな感じでマクロにします。
//*5 q1.mac - 1999/03/25 - K.N.
//*5 typein "wk1?"; ? - は数字の指定 。。。
//*5 test data - wk1, wk11, wk111, wk1111;
if( selecting && ( seltopy == selendy)){
$wk1 = gettext(seltopx,seltopy,selendx,selendy);
}
$wk2 = input("Typein String",$wk1);
if( ( ! result ) || $wk2 == "" ){ endmacro; }
escape; right;
#i = 0;
$wk1 = "";
if( strstr($wk2,"?") != -1){ $wk1 = "\\<"; }
while( #i < strlen($wk2) ){
if( midstr($wk2,#i,1) == "?" ){
$wk1 = $wk1 + "[0-9]";
#k = #k + 1;
#j = yes;
} else {
$wk1 = $wk1 + midstr($wk2,#i,1);
#j = no;
}
#i = #i + 1;
}
if( #k ){
if( #j ){ $wk1 = $wk1 + "[^0-9]"; }
//D message $wk1;
searchdown $wk1, regular, inselect;
} else {
//D message $wk1;
searchdown $wk1, word, inselect;
}
endmacro;
|
|