home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 2000 April
/
VPR0004A.BIN
/
OLS
/
CSSH102
/
CSSH102.LZH
/
csshtml
/
opencss.mac
< prev
next >
Wrap
Text File
|
1999-12-20
|
7KB
|
179 lines
////////////////////////////////////////////////////////////
// opencss.mac
// Toshiyuki Akutsu <locrian@mbd.sphere.ne.jp>
// Mon, 20 Dec 1999 21:30:54
////////////////////////////////////////////////////////////
// execmacro $__macroPath + "csshtml\\opencss.mac";
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";
////////////////////////////////////////////////////////////
$$ACC = "&1 &2 &3 &4 &5 &6 &7 &8 &9 &A &B &C &D";
##size = getininum($__INI,"CSSFILE","SIZE");
if( ##size < 1 || ##size > 30 ) endmacro;
##i = 0;
while( ##i < ##size ){
$$num = str(##i);
$$acc = midstr( $$ACC,3 * ##i, 3 );
//$$file = getinistr($__INI,"CSSFILE",$$num);
$$name = getinistr($__INI,"CSSFILE_NAME",$$num);
$$mi[##i] = $$acc + $$name;
##i = ##i + 1;
}
##exit = ##i; // = ##size;
$$mi[##exit] = "&Q 終了 ( ESC )";
##end = ##exit + 1;
menuarray $$mi, ##end;
##item = result - 1;
if( ##item < 0 || ##item == ##exit ) endmacro;
$$num = str(##item);
$$file = getinistr($__INI,"CSSFILE",$$num);
call openFile $$file;
if( ##return < 0 ) call createCssFile ##item;
endmacro;
////////////////////////////////////////////////////////////
openFile:
$$option = $$1;
$$targetFile = $$2;
if( $$targetFile == "" ){
$$targetFile = $$option; $$option = "";
}
call toLowerCase $$targetFile;
$$targetFile = $$return;
$$clientFile = filename;
##opened = 0;
if( $$targetFile != $$clientFile ){
##num_targetFile = findhidemaru( $$targetFile );
if( ##num_targetFile > 0 ){
setactivehidemaru ##num_targetFile;
}else{
if( existfile( $$targetFile ) ){
openfile $$option + "\"" + $$targetFile + "\"";
##opened = 1;
}else{
##opened = -1;
}
}
}
return ##opened;
// end of openFile
// openFileHelp@
////////////////////////////////////////////////////////////
toLowerCase:
$$str = $$1; $$ret = "";
##iend = strlen( $$str );
##i = 0;
while( ##i < ##iend ){
##code = ascii( midstr( $$str, ##i, 1 ) );
if( ##code & 0xFF00 ){
$$ret = $$ret + midstr( $$str, ##i, 2 );
##i = ##i + 2;
}else{
if( ##code >= 0x41 && ##code <= 0x5A ) ##code = ##code + 32;
$$ret = $$ret + char( ##code );
##i = ##i + 1;
}
}
return $$ret;
// end of toLowerCase
////////////////////////////////////////////////////////////
createCssFile:
$$num = str(##1);
// $$file = getinistr($__INI,"CSSFILE",$$num);
$$name = getinistr($__INI,"CSSFILE_NAME",$$num);
newfile;
insert "/* -----------------------------------------------\n";
insert " MenuItemNumber: " + $$num + " ( in csshtml.ini )\n";
insert " Name: " + $$name + " ( in [CSSFILE_NAME] )\n";
//insert " File: " + $$file + " ( in [CSSFILE] )\n";
insert " -----------------------------------------------\n";
insert " ファイルタイプ別設定の「カラー」表示順\n";
insert " -----------------------------------------------\n";
insert "*/\n\n";
insert "BODY{ } /* 普通の文字 と 背景 */\n";
insert ".h200{ } /* 改行 ↓ */\n";
insert ".h04{ } /* 強調表示 1 */\n";
insert ".h07{ } /* 強調表示 2 */\n";
insert ".h22{ } /* 強調表示 3 */\n";
insert ".h23{ } /* 強調表示 4 */\n";
insert ".h06{ } /* 行の強調表示 1 */\n";
insert ".h09{ } /* 行の強調表示 2 */\n";
insert ".h03{ } /* コメント */\n";
insert ".h20{ } /* 文字定数(\"...\") */\n";
insert ".h13{ } /* HTMLタグ全体(<...>) */\n";
insert ".h14{ } /* HTMLタグのエレメント */\n";
insert ".h15{ } /* HTMLタグのアトリビュート */\n";
insert ".h11{ } /* ホームページ URL(http:等) */\n";
insert ".h12{ } /* メールアドレス(abc@xyz.co.jp) */\n";
insert ".h21{ } /* ファイル名 */\n";
insert ".h05{ } /* 特に強調表示 1 */\n";
insert ".h08{ } /* 特に強調表示 2 */\n\n";
insert "/* -----------------------------------------------\n";
insert " 白い背景のデフォルトの配色( おおよそ )\n";
insert " BODY{ color:#000000; background:#FFFFFF }\n";
insert " 白 color:#ffffff\n";
insert " 赤 color:#800000\n";
insert " 緑 color:#008000\n";
insert " 紫 color:#800080\n";
insert " 青 color:#000080\n";
insert " 空色 color:#008080\n";
insert " 茶色 color:#808000\n";
insert " 灰色 color:#808080\n";
insert " 黒い灰色 color:#404040\n";
insert " 白い灰色 color:#c0c0c0\n";
insert " 黒 color:#000000\n";
insert " 明るい赤 color:#ff0000\n";
insert " 明るい紫 color:#ff00ff\n";
insert " 明るい青 color:#0000ff\n";
insert " 赤の反転 color:#ffffff;background:#800000\n";
insert " 緑の反転 color:#ffffff;background:#008000\n";
insert " 紫の反転 color:#ffffff;background:#800080\n";
insert " 青の反転 color:#ffffff;background:#000080\n";
insert " 空色の反転 color:#ffffff;background:#008080\n";
insert " 茶色の反転 color:#ffffff;background:#808000\n";
insert " 灰色の反転 color:#ffffff;background:#808080\n";
insert " 黒の反転 color:#ffffff;background:#000000\n";
insert "\n";
insert " 黒い背景のデフォルトの配色( おおよそ )\n";
insert " BODY{ color:#FFFFFF;background:#000000 }\n";
insert " 白 color:#ffffff\n";
insert " 赤 color:#ff4040\n";
insert " 緑 color:#40ff40\n";
insert " 紫 color:#ff40ff\n";
insert " 青 color:#4040ff\n";
insert " 空色 color:#40ffff\n";
insert " 黄色 color:#ffff40\n";
insert " 灰色 color:#c0c0c0\n";
insert " 反転 color:#000000;background:#ffffff\n";
insert " 赤い背景 color:#ffffff;background:#ff0000\n";
insert " 緑の背景 color:#ffffff;background:#008000\n";
insert " 紫色の背景 color:#ffffff;background:#800080\n";
insert " 青い背景 color:#ffffff;background:#0000ff\n";
insert " 空色の背景 color:#ffffff;background:#008080\n";
insert " 茶色の背景 color:#ffffff;background:#808000\n";
insert " 灰色の背景 color:#ffffff;background:#808080\n";
insert " -----------------------------------------------\n";
insert "*/\n\n";
gofiletop;
// if( rightstr( $$name, 4 ) != ".css" ) $$name = $$name + ".css";
changename $$name;
$$file = filename;
writeinistr $__INI,"CSSFILE",$$num,$$file;
return;
////////////////////////////////////////////////////////////