home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 2000 April
/
VPR0004A.BIN
/
OLS
/
CSSH102
/
CSSH102.LZH
/
csshtml
/
spanreplacer_menu.mac
< prev
next >
Wrap
Text File
|
1999-12-20
|
4KB
|
121 lines
////////////////////////////////////////////////////////////
// spanreplacer_menu.mac
// Toshiyuki Akutsu <locrian@mbd.sphere.ne.jp>
// Mon, 20 Dec 1999 21:30:54
////////////////////////////////////////////////////////////
openreg "CURRENTUSER", "Software\\Hidemaruo\\Hidemaru\\Env";
if( ! result ) endmacro;
$__macroPath = getregstr( "MacroPath" );
closereg;
if( $__macroPath == "" ) $__macroPath = hidemarudir;
if( rightstr( $__macroPath, 1 ) != "\\" ) $__macroPath = $__macroPath + "\\";
$__INI = $__macroPath + "csshtml\\csshtml.ini";
////////////////////////////////////////////////////////////
writeininum $__INI, "SUBMACRO", "EXECUTE", 0;
call initializeVariables;
RE_MENU:
menuarray $__MI,#__EXIT + 1;
##item = result - 1;
if( ##item < 0 || ##item == #__EXIT ){
endmacro;
}else if( ##item == #__RESET ){
call resetReplacement;
goto RE_MENU;
}else if( ##item == #__EXECUTE ){
writeininum $__INI, "SUBMACRO", "EXECUTE", 1;
endmacro;
}
call setReplacementOfSpan ##item;
goto RE_MENU;
//end spanreplacer_menu.mac
////////////////////////////////////////////////////////////
setReplacementOfSpan:
##class = ##1;
$$class = str(##class);
if( $__ROS[##class][0] == "" )
$$default = "< CLASS="+ $__Q + $__CLASS[##class] + $__Q + ">";
else
$$default = $__ROS[##class][0];
$$mes = $__NAME[##class] + "\n開始タグを入力して下さい。";
$$tmpTag[0] = input($$mes, $$default);
if( !result ){
return;
}else if( $$tmpTag[0] == "" ){
##i = ##class;
$__ROS[##i][0] = "";
writeinistr $__INI,"REPLACEMENT_OF_SPAN_0", $$class,"";
$$tmp = midstr($__ACC, 3 * ##i, 3)+ $__CLASS[##i] +" "+ $__NAME[##i];
$__MI[##i] = $$tmp + " > そのまま";
return;
}
$$mes = $$tmpTag[0] + "★\n終了タグを入力して下さい。";
$$tmpTag[1] = input($$mes, "</>");
if( (result==0) || ($$tmpTag[1]=="") ) return;
##i = ##class;
$__ROS[##i][0] = $$tmpTag[0];
$__ROS[##i][1] = $$tmpTag[1];
writeinistr $__INI,"REPLACEMENT_OF_SPAN_0", $$class,$__ROS[##i][0];
writeinistr $__INI,"REPLACEMENT_OF_SPAN_1", $$class,$__ROS[##i][1];
$$tmp = midstr($__ACC,3 * ##i, 3) + $__CLASS[##i] + " " + $__NAME[##i];
$__MI[##i] = $$tmp + " > " + $__ROS[##i][0] + "★" + $__ROS[##i][1];
return;
// end setReplacementOfSpan
////////////////////////////////////////////////////////////
//最初の変数の取得と、メニューの構築
initializeVariables:
$__ACC = "&1 &2 &3 &4 &5 &6 &7 &8 &9 &A &B &C &D &E &F &R &M &Q ";
#__SIZE = getininum($__INI,"REPLACEABLE_SPAN_CLASS","SIZE");
##i = 0;
while( ##i < #__SIZE )
{
$$num = str(##i);
$__CLASS[##i] = getinistr($__INI,"REPLACEABLE_SPAN_CLASS",$$num);
$__NAME[##i] = getinistr($__INI,"REPLACEABLE_SPAN_NAME",$$num);
$__ROS[##i][0] = getinistr($__INI,"REPLACEMENT_OF_SPAN_0",$$num);
$__ROS[##i][1] = getinistr($__INI,"REPLACEMENT_OF_SPAN_1",$$num);
$$tmp = midstr($__ACC, 3 * ##i, 3)+ $__CLASS[##i] +" "+ $__NAME[##i];
if( $__ROS[##i][0] == "" ) $__MI[##i] = $$tmp + " > そのまま";
else $__MI[##i] = $$tmp + " > " + $__ROS[##i][0] + "★" + $__ROS[##i][1];
##i = ##i + 1;
}
#__RESET = #__SIZE;
#__EXECUTE = #__SIZE + 1;
#__EXIT = #__SIZE + 2;
##i = #__RESET;
$__MI[##i] = midstr($__ACC,3 * ##i,3) + "リセット";
##i = ##i + 1;
$__MI[##i] = midstr($__ACC,3 * ##i,3) + "SPAN置換 実行";
##i = ##i + 1;
$__MI[##i] = midstr($__ACC,3 * ##i,3) + "設定だけで戻る ( ESC )";
##i = getininum($__INI,"CSSHTML","__DQUOT");
if( ##i ) $__Q = "\"";
else $__Q = "'";
return;
// end initializeVariables
////////////////////////////////////////////////////////////
resetReplacement:
question "現在の設定をリセットします。\nよろしいですか?";
if( ! result ) return;
##i = 0;
while( ##i < #__SIZE ){
$$num = str(##i);
$__ROS[##i][0] = "";
writeinistr $__INI,"REPLACEMENT_OF_SPAN_0",$$num,"";
$__MI[##i] = midstr($__ACC,3 * ##i,3)+$__CLASS[##i]+" "+ $__NAME[##i]+" > そのまま";
##i = ##i + 1;
}
return;
// end resetReplacement
////////////////////////////////////////////////////////////