HTML を作るスクリプト

  create.hta



  
<HTML>
<HEAD>
	<META HTTP-EQUIV="Content-Type" Content="text/html; charset=shift_jis">
</HEAD>
<FRAMESET rows="*">
	<FRAME name="Input" src="input.htm" APPLICATION="yes">
</FRAMESET>
</HTML>

  



  input.htm



<SCRIPT language=VBScript>

' ----------------------------------------------------------
' 定数定義
' ----------------------------------------------------------
Const ForReading = 1, ForWriting = 2

' ----------------------------------------------------------
' オブジェクト用変数定義
' ----------------------------------------------------------
Dim fs,fh

' ----------------------------------------------------------
' ファイルシステムオブジェクト作成
' ----------------------------------------------------------
Set fs = CreateObject( "Scripting.FileSystemObject" )

' ----------------------------------------------------------
' 変数
' ----------------------------------------------------------
' **********************************************************
' カレントディレクトリ取得
' **********************************************************
Function GetCurrentDir( )

	CurrentDir = location
	CurrentDir = Replace( CurrentDir, "file:///", "" )
	CurrentDir = Replace( CurrentDir, "input.htm", "" )
	CurrentDir = Replace( CurrentDir, "/", "\" )

	GetCurrentDir = CurrentDir

End Function

' **********************************************************
' 基本セット作成
' **********************************************************
Function CreateSet()

	Set fh = fs.OpenTextFile( GetCurrentDir( ) & "game.hta", ForWriting, True )

	fh.WriteLine "<HTML>"
	fh.WriteLine "<HEAD>"
	fh.WriteLine "<META HTTP-EQUIV=""Content-Type"" Content=""text/html; charset=shift_jis"">"
	fh.WriteLine "</HEAD>"
	fh.WriteLine "<FRAMESET rows=""*"">"
	fh.WriteLine "<FRAME name=""Input"" src=""start.htm"" APPLICATION=""yes"">"
	fh.WriteLine "</FRAMESET>"
	fh.WriteLine "</HTML>"

	Call fh.Close()

	Set fh = fs.OpenTextFile( GetCurrentDir( ) & "start.htm", ForWriting, True )

	fh.WriteLine "<S" & "CRIPT language=VBScript>"
	fh.WriteLine "</S" & "CRIPT>"
	fh.WriteLine ""
	fh.WriteLine "<HTML>"
	fh.WriteLine "<HEAD>"
	fh.WriteLine "<META HTTP-EQUIV=""Content-Type"" Content=""text/html; charset=shift_jis"">"
	fh.WriteLine "<STYLE type=""text/css"">"
	fh.WriteLine "IMG	{ position:absolute }"
	fh.WriteLine "INPUT	{ position:absolute }"
	fh.WriteLine "</STYLE>"
	fh.WriteLine "</HEAD>"
	fh.WriteLine "<BODY id=""Body"">"
	fh.WriteLine "</BODY>"
	fh.WriteLine "</HTML>"

	Call fh.Close()


End Function

</SCRIPT>

<HTML>
<BODY>

<INPUT type=button value="基本セット作成" onClick='Call CreateSet()'>


</BODY>
</HTML>











  infoboard   管理者用   
このエントリーをはてなブックマークに追加





フリーフォントWEBサービス
SQLの窓WEBサービス

SQLの窓フリーソフト

素材

一般WEBツールリンク

SQLの窓

フリーソフト

JSライブラリ