Originally posted by zh159 at 2007-3-4 06:14:
This still needs to be connected to two HTML files into
<frame name="left" src="html file 1">
<frame name="right" src="html file 2">
to be effective...
Thank you, Brother ZH for the answer. Currently, I am learning HTML programming. I have basically got the program done, but there is still a problem. The above-mentioned how to fix the header and footer on the same page. Using the FRAME method requires another two pages, which is very troublesome. So is there any other way to solve it? Does the FRAME really not solve it? Can it be realized by directly referencing the child FRAME in the parent FRAME for programming? If it is not solved, it is really ugly. The following is the VBS code, save it as VBS and everyone can test it.
'Reference the internetexplorer.application object of shdocvw.dll. If fullscreen=1, there is no title bar
set WshShell = Wscript.CreateObject("Wscript.Shell")
set ie=wscript.createobject("internetexplorer.application","event_")
ie.fullscreen=1
ie.menubar=0
ie.addressbar=0
ie.toolbar=0
ie.statusbar=0
ie.resizable=0
ie.width=600
ie.height=400
ie.navigate "about:blank"
ie.left=fix((ie.document.parentwindow.screen.availwidth-ie.width)/2)
ie.top=fix((ie.document.parentwindow.screen.availheight-ie.height)/2)
ie.visible=1
with ie.document
.write "<html><title>One-click Installation Manager</title><meta http-equiv='Content-Type' content='text/html; charset=gbk'>"
.write "<style type='text/css' id='css'>.button {font: 15px 宋体, Verdana;height:32px;width:100px;}</style>"
.write "<body onload=sf() background='D:\OK\sys\FAX\bg.gif' bgcolor=#e3e5da oncontextmenu='return false' scroll=yes style='font-family:宋体;font-size:15px;'>"
.write "<table align=center style='font-family:楷体_gb2312;font-size:24px;'><td><b>One-click Installation Manager V1.0</b></td></table>"
.write "<table width=550 align=center style='FILTER: progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr=#9ab8f6,endColorStr=#5a7dde)'><td align=left style='font-size:1px;'> </td></table>"
.write "<table width=550 align=center borderColor=#698cc2 border=1 cellSpacing=0 cellpadding=5 style='font-size:15px;border:#5a7dde 3px solid;'>"
.write "<tr><td align=center bgcolor=#698cc2 style='FILTER: progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr=#9ab8f6,endColorStr=#5a7dde)' colspan=4><b><font style=font-size:18px;color:#ffffff;> Welcome to use One-click Installation Manager </font><br><font style=color:#d0d0d0;><a title='China DOS Union Forum'>QQ:9399100</a> <a title='Refer to Brother zh159's IE batch processing interface writing'>EMAIL:xiaobudian528@yahoo.com.cn</a></font></b></td></tr>"
.write "<tr><td align=left colspan=4><b>Select the following software to install, then click Install to proceed</td><tr>"
.write "<tr align=center><td colspan=1><b>Software Name</b></td><td colspan=3><b>Software Description</b></td><tr>"
.write "<tr><td align=left colspan=1><INPUT type='checkbox' CHECKED name='InStallList' value='32bit Fax x9.43.01 汉化版.exe'><b>32bit Fax x9.43.01 Chinese Version</b></td>"
.write "<td align=left colspan=3> </td><tr>"
.write "<tr><td align=left colspan=1><INPUT type='checkbox' CHECKED name='InStallList' value='FaxMail Network 94301.exe'><b>FaxMail Network 94301</b></td>"
.write "<td align=left colspan=3> </td><tr>"
.write "<tr><td align=left colspan=1><INPUT type='checkbox' CHECKED name='InStallList' value='HB-RelayFax504pro.rar'><b>HB-RelayFax504pro</b></td>"
.write "<td align=left colspan=3> ;The following comments contain self-extracting script commands</td><tr>"
.write "<tr><td align=left colspan=1><INPUT type='checkbox' CHECKED name='InStallList' value='mf32_9X(mightyfax3.08).rar'><b>mf32_9X(mightyfax3.08)</b></td>"
.write "<td align=left colspan=3> </td><tr>"
.write "<tr><td align=left colspan=1><INPUT type='checkbox' CHECKED name='InStallList' value='mf32_NT(MightyFAX3.08).rar'><b>mf32_NT(MightyFAX3.08)</b></td>"
.write "<td align=left colspan=3> </td><tr>"
.write "<tr><td align=left colspan=1><INPUT type='checkbox' CHECKED name='InStallList' value='MightyFAX 3.08_9X_HYQ9.rar'><b>MightyFAX 3.08_9X_HYQ9</b></td>"
.write "<td align=left colspan=3> </td><tr>"
.write "<tr><td align=left colspan=1><INPUT type='checkbox' CHECKED name='InStallList' value='MightyFAX 3.08_NT_HYQ9.rar'><b>MightyFAX 3.08_NT_HYQ9</b></td>"
.write "<td align=left colspan=3> </td><tr>"
.write "<tr><td align=left colspan=1><INPUT type='checkbox' CHECKED name='InStallList' value='PC-Telephone V5.9(支持网络电话传真).exe'><b>PC-Telephone V5.9(Supports Network Telephone Fax)</b></td>"
.write "<td align=left colspan=3> </td><tr>"
.write "<tr><td align=left colspan=1><INPUT type='checkbox' CHECKED name='InStallList' value='test.rar'><b>test</b></td>"
.write "<td align=left colspan=3> width and height attributes respectively specify a fixed width and length of the table, n1 and n2 can be expressed in pixels or as a percentage (compared with the size of the entire screen...rowsp</td><tr>"
.write "<tr><td align=left colspan=1><INPUT type='checkbox' CHECKED name='InStallList' value='VentaFax 5.7.26.exe'><b>VentaFax 5.7.26</b></td>"
.write "<td align=left colspan=3> </td><tr>"
.write "<tr><td align=left colspan=1><INPUT type='checkbox' CHECKED name='InStallList' value='WINFAXminiview.exe'><b>WINFAXminiview</b></td>"
.write "<td align=left colspan=3> </td><tr>"
.write "<tr><td align=left colspan=4 bgcolor=#698cc2 style='FILTER: progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr=#9ab8f6,endColorStr=#5a7dde);'><font style=font-size:15px;color:#ffffff;><b>Installation Mode:</b><input type='radio' CHECKED name='INSTALLMODLE' value='M1' title='The default is to install in the conventional way, which can not only install green software, but also install ordinary software. When installing green software, it can also be installed without pre-compression'>One-click Conventional Installation<input type='radio' name='INSTALLMODLE' value='M2' title='Can only install pre-compressed green software, non-green software will be ignored'>One-click Green Installation<input type='radio' name='INSTALLMODLE' value='M3' title='Repair the installed green software, requiring that there is GSETUP.bat in the green software directory'>One-click Green Repair<input type='radio' name='INSTALLMODLE' value='M4' title='Uninstall the installed green software, requiring that there is install.bat in the green software directory'>One-click Green Uninstall<br><B>Installation Path:</B><input type='text' ID='IPATH' name='IPATH' SIZE='70'value='D:\GREEN' title='When setting, pay attention not to enter the last \ of the path, for example, C: should not be set to C:\, for example, C:\MYSOFT should not be set to C:\MYSOFT\, in addition, if not set, the default installation path is D:\GREEN'></font></td></tr>"
.write "<tr><td align=center width=25% style='font-size:0px;FILTER: progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr=#9ab8f6,endColorStr=#5a7dde);'> </td><td align=center width=25% style='font-size:0px;FILTER: progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr=#9ab8f6,endColorStr=#5a7dde);'></td>"
.write "<td align=center width=25% style='font-size:0px;FILTER: progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr=#9ab8f6,endColorStr=#5a7dde);'> </td><td align=center width=25% style='font-size:0px;FILTER: progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr=#9ab8f6,endColorStr=#5a7dde);'> </td><tr></table>"
.write "<table width=550 align=center border=0 cellSpacing=0 cellpadding=5 ><tr align=center><td align=center width=25%><input id=btALL type=submit class=button value='Select All' title='Select All or Cancel All to facilitate software installation' style='font-family:楷体_gb2312;font-size:21px;width=100;border: 1 solid #9ab8f6;FILTER: progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr=#10bfff,endColorStr=#007db2);cursor:hand;color:#ffffff;'></td><td align=center width=25%><input id=btInstall type=button class=button value='Install Now' title='Install the selected software now' style='font-family:楷体_gb2312;font-size:21px;width=100;border: 1 solid #9ab8f6;FILTER: progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr=#10bfff,endColorStr=#007db2);cursor:hand;color:#ffffff;'></td>"
.write "<td align=center width=25%><input id=btGInStallList type=button class=button value='Make Installation Script' title='Generate InStallList.TXT file in the current directory to facilitate installation according to this file, so that software comments can be set arbitrarily and installation speed can be improved.' style='font-family:楷体_gb2312;font-size:21px;width=140;border: 1 solid #9ab8f6;FILTER: progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr=#10bfff,endColorStr=#007db2);cursor:hand;color:#ffffff;'></td><td align=center width=25%><input type=button class=button onClick='opener=null;window.close()' value='Exit Program' title='Exit Installation Program' style='font-family:楷体_gb2312;font-size:21px;width=100;border: 1 solid #9ab8f6;FILTER: progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr=#10bfff,endColorStr=#007db2);cursor:hand;color:#ffffff;'></td></tr></td></table>"
.write "</body></html>"
end with
dim wmi
set wnd=ie.document.parentwindow
set id=ie.document.all
id.btAll.onclick=getref("btALL")
id.btInstall.onclick=getref("btInstall")
id.btGInStallList.onclick=getref("btGInStallList")
do while true
wscript.sleep 500
WshShell.AppActivate ("One-click Installation Manager - Microsoft Internet Explorer")
loop
sub event_onquit
Wscript.Echo "exit"
wscript.quit
end sub
sub btALL
with id
if .btALL.value="Select All" then
for sx=0 to .InStallList.length-1
.InStallList(sx).checked=-1
next
.btALL.value="Cancel All"
elseif .btALL.value="Cancel All" then
for sx=0 to .InStallList.length-1
.InStallList(sx).checked=0
next
.btALL.value="Select All"
end if
end with
end sub
sub btGInStallList
msg="Making the installation script will exit and restart this program, are you sure?"
ie.visible=0
IF MsgBox(msg,vbQuestion+vbYesNo,"Xiao Budian Reminds You")=vbNo then
ie.visible=1
exit sub
END IF
Wscript.Echo "btGInStallList"
ie.quit
end sub
sub btInstall
ie.visible=0
with id
if .IPATH.value="" then
msgbox "Installation path cannot be empty, please re-enter!"
ie.visible=1
exit sub
elseif right(.IPATH.value,1)="\" then
msgbox "The last character of the installation path cannot be \, please re-enter!"
ie.visible=1
exit sub
end if
Wscript.Echo .IPATH.value
dim mx
for mx=0 to 3
if .INSTALLMODLE(mx).checked=-1 then Wscript.Echo .INSTALLMODLE(mx).value
next
dim sx,nx
if isobject(InStallList)=fale then exit sub
nx=0
for sx=0 to .InStallList.length-1
if .InStallList(sx).checked=-1 then
nx=nx+1
Wscript.Echo .InStallList(sx).value
end if
next
ie.quit
end with
end sub
[
Last edited by HUNRYBECKY on 2007-3-7 at 01:08 AM ]