|
下記のマクロで動かしてました。
//-------------------- search string for google ---------------------
$word = gettext(seltopx,seltopy,selendx,selendy);
if($word == "")endmacro;
call ChangeCharacter $word, " ", "+";
$word = $$return;
run "start http://www.google.com/search?lr=lang_ja&hl=ja&q=" + $word;
//もし日本語サイトに限定しないなら、上記^^^^^^^^^^^を削除
endmacro;
ChangeCharacter:
##change_char = strlen($$2);
while(1){
##long = strlen($$1);
##number = strstr($$1,$$2);
if(##number == -1)break;
else $$1 = leftstr($$1, ##number) + $$3
+ rightstr($$1,##long-##number-##change_char);
}return $$1;
//----------------------------------------------------------------------
if(selecting){
$$return = gettext(seltopx,seltopy,selendx,selendy);
if( strstr($$return,"\x0D") != -1 && strstr($$return,"\x0A") != -1){
call ChangeCharacter $$return,"\x0D","";
call ChangeCharacter $$return,"\x0A","";
run "start " + $$return;
}
else directtagjump;
}
else directtagjump;
endmacro;
ChangeCharacter://buff 中の文字列を置換
##change_char=strlen($$2);
$$string = "";
while(1){
##number = strstr($$1, $$2);
if(##number == -1)break;
else{
##long = strlen($$1);
$$string = $$string + leftstr($$1, ##number) + $$3;
$$1 = rightstr($$1, ##long - ##number - ##change_char);
}
}
return $$string + $$1;
|
|