home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 1998 January (DVD)
/
VPR980100.ISO
/
OLS
/
WIN32
/
KAKIMAC
/
KAKIMAC1.LZH
/
GYOUTAG2.MAC
< prev
next >
Wrap
Text File
|
1994-07-07
|
3KB
|
93 lines
//【マクロ名】 gyouTAG2.mac by 水銀水(Suigwinsui) / 小田 明夫 (HGD01603) 94/07/06(水) 14:10:13
//【主な用途】日本語文書作成支援「書きマクロ」シリーズ Vol.5.#K3
// gyouCHK2.mac出力結果ファイル専用、一発ジャンプ(gyouCHK2.mac特化タグジャンプ)
//【使用対象】秀丸 for Windows 上で日本語文章を快適に処理したい全てのみなさま。
//【機能概略】(1)youCHK2.mac出力結果ファイルで一発見出ジャンプ(gyouCHK2.mac特化タグジャンプ)
// (2)gyouTAG2.mac は、キー割当でいずれかのキーに設定しておくと、キー一発で折り返し設定出来ます。
// (3)gyouCHK2.mac とコンビで使う以外はあまり用途はありません(^^;
//【使用法】 gyouCHK2.mac で出力された結果ファイルで、調べて見たい見出行にカーソルを置き、
// このマクロを実行する。
if(code == eof)call missline;
$OrgFileName=filename;$disp_m1="(C) 1994 My Friend Office 水銀水(Suigwinsui)/小田 明夫(HGD01603)";
golinetop;
//括弧のチェック
call k1;
if (##return)call missline;
call k2;
if (##return)call missline;
//括弧内の番号のチェック
$SearchMidasi0 = gettext(#xx1,y,#xx2+1,y);
$SearchMidasi00 = gettext(#xx1+1,y,#xx2,y);
#Numlen = strlen($SearchMidasi00);
#n=0;
while(1){
$c1=midstr($SearchMidasi00,#n,1);
if (ascii($c1)<48||ascii($c1)>57)call missline;
#n=#n+1;
if(#n>=#Numlem)break;
}
$SearchMidasi1 = "●"+$SearchMidasi0;
$SearchMidasi2 = "■"+$SearchMidasi0;
//ファイル名取得
searchup "対象ファイル名";
call k1;
if (##return)call missline;
call k2;
if (##return)call missline;
//ファイルチェック&移動
$SearchFile = gettext(#xx1+1,y,#xx2,y);
if (findhidemaru($SearchFile)==-1) openfile $SearchFile;
else setactivehidemaru findhidemaru($SearchFile);
if(code == eof){
message "対象ファイル:["+$SearchFile+"] は、ありませんでした。\n"+
"結果出力後にファイル削除か、ファイル名変更を行ったと考えられます。\n"+
"調べたいファイルを開き再度、gyouCHK2.mac を実行して下さい\n"+
"-------------------------------------------------\n"+$disp_m1;
exit;
setactivehidemaru findhidemaru($OrgFileName);
endmacro;
}
gofiletop;
while(1){
searchdown $SearchMidasi1;
if(!result)searchdown $SearchMidasi2;
if(!result){//検索失敗
message "ジャンプ目標の見出行 ["+$SearchMidasi+"] が見つかりません。\n"+
"行数チェックの後でファイルを操作したか、\n"+
"結果ファイルの連番を書き直したと考えられます。\n"+
"このファイルで gyouCHK2.mac を実行し、見出連番を付け直して下さい(^^;\n\n"+
"--------------------------------------------\n"+$disp_m1;
}
#xx1=x;#yy1=y;
moveto #xx1,#yy1;
if(x==0)break;
}
endmacro;
k1:
##endf=0;
while(1){
if(code=='['){#xx1=x;break}
right;
if(code == 13)##endf=1;
}
return ##endf;
k2:
##endf=0;
while(1){
if(code==']'){#xx2=x;break}
right;
if(code == 13)##endf=1;
}
return ##endf;
missline:
message "カーソルのある行が不適切です。\n"+
"結果出力の行頭が [1],[2],..などの行にカーソルを置いて下さい。\n"+
"--------------------------------------------\n"+$disp_m1;
endmacro;
return;