| <SCRIPT language=VBScript>
Dim Http
'***********************************************************
' execScript のテスト
'***********************************************************
function ExecVbs()
if IsEmpty( Http ) then
Set Http = CreateObject( "MSXML2.XMLHTTP" )
end if
Dim Fp,strVbs,strBin
Call Http.Open("GET", "http://localhost/tools/vbs.txt", False )
Http.Send
strBin = Http.responseBody
' バイナリ -> 内部コード
For i = 1 To LenB( strBin )
c1 = AscB(MidB(strBin, i, 1))
if &H81 <= c1 and c1 <= &H9f or &He0 <= c1 and c1 <= &Hfc then
i = i + 1
c2 = AscB(MidB(strBin, i, 1))
c1 = c1 * 16 * 16 + c2
end if
strVbs = strVbs & Chr(c1)
Next
Call window.execScript( strVbs, "VBScript" )
alert( TypeName(Shell) & "|" & TypeName(objFolder) )
end function
</SCRIPT>
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; CHARSET=Shift_JIS">
</HEAD>
<BODY>
<INPUT
type=button
value="実行"
onClick='Call ExecVbs()'
>
</BODY>
</HTML>
| |