$cmdline = "perl -w";
//V8.00 disablehistory 0xff;
disabledraw;
#encode=encode;
selectall;
copy;
openfile "/n"; //newfile;
paste;
call GetTempFile "tempinput";
$tempinput = $$return;
if($tempinput=="")endmacro;
setencode #encode,1;
saveas $tempinput;
call GetTempFile "tempoutput";
$tempoutput = $$return;
if($tempoutput=="")endmacro;
run $cmdline + " <\"" + $tempinput + "\" >\"" + $tempoutput + "\"";
#h=hidemaruhandle(0);
openfile "/n /f" + str(#encode) + " \"" + $tempoutput + "\"";
closehidemaru #h;
changename "";
clearupdated;
if($tempinput!=""){
run "cmd /c del \"" + $tempinput + "\" >nul";
//V8.00 deletefile $tempinput;
}
if($tempoutput!=""){
run "cmd /c del \"" + $tempoutput + "\" >nul";
//V8.00 deletefile $tempoutput;
}
endmacro;
//テンポラリファイル作成サブルーチン
GetTempFile:
#n=0;
while(#n<1000){
if( !existfile( $$1+str(#n) ) ) return $$1+str(#n);
#n = #n + 1;
}
return "";
|