<Title> Netease file uptake </title>
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312">
<HTA: Application
Id = "myhyliapp"
Applicationname = "Settings Program "
Version = "1.0"
Scroll = "no"
Innerborder = "no"
Contextmenu = "no"
Caption = "yes"
Showintaskbar = "yes"
Singleinstance = "yes"
Sysmenu = "yes"
Windowstate = "normal"
Navigable = "yes"
/>
<Style type = "text/CSS">
<! --
. TT1 {font-family: "";
Font-size: 24px;
Font-weight: bold;
}
. Title {
}
. Info {
Font-family: "";
Font-size: 16px;
Color: # ff0000;
Font-weight: bold;
}
. Separator {width: 100%;
Margin: 2px;
Margin-top:-4px;
Height: 12px;
Overflow: hidden;
}
. List {Height: 80px;
Width: 100%;
Background-color: # e3eff9;
}
. S_button {
Background-color: # ffcc99;
Position: static;
Text-align: center;
Vertical-align: middle;
Padding: 1px;
Color: # 0033cc;
Border: 1px solid #996633;
Width: 100%;
}
. Grid1 {
Font-family: "";
Font-size: 16px;
Background-color: #006699;
Background-position: center;
Text-align: center;
Vertical-align: middle;
Height: 100%;
Width: 100%;
Color: #00ff99;
}
. Grid2 {
Font-family: "";
Text-align: left;
Vertical-align: middle;
Height: 100%;
Width: 100%;
Font-size: 12px;
}
. Grid3 {
Text-align: center;
Vertical-align: middle;
Height: 100%;
Width: 100%;
}
. Preview {
Position: absolute;
Width: 140px;
Height: 140px;
Z-index: 1;
Left: 301px;
Top: 61px;
Overflow: visible;
Border-top-color: # ff0000;
Border-right-color: # ff0000;
Border-bottom-color: # ff0000;
Border-left-color: # ff0000;
Background-color: # ff9966;
Margin: 1px;
Padding: 1px;
Visibility: hidden;
}
. Style2 {
Color: #00ff00;
Font-weight: bold;
Font-family: "";
Font-size: 14px;
}
-->
</Style>
<Div class = "separator">
<HR>
</Div>
<Table width = "100%" Height = "4%" border = "0" cellspacing = "0" cellpadding = "0">
<Tr>
<TD colspan = "2" align = "center" valign = "Middle" id = menubar onselectstart = "Return false"> <SPAN class = "TT1" id = "consume"> netease image file list </span> </TD>
</Tr>
</Table>
<Div class = "separator">
<HR>
</Div>
<Table width = "100%" Height = "415" border = "1">
<Tr>
<TD width = "81%" Height = "16" rowspan = "8" valign = "TOP" bgcolor = "# ffffff" style = "border-style: solid; border-color: #000080 "> <Div class =" info "id = List style =" width: 100%; Height: 405; overflow-Y: auto; Border: solid 1 gray; "> </div> </TD>
<TD Height = "16" colspan = "2" align = "center" valign = "Middle" bordercolor = "# ff0000" bgcolor = "#000080" style = "border-style: solid; border-color: #000080 "> <Div class =" preview "id =" preview ">
<P> </P>
</Div>
<SPAN class = "style2"> information announcement </span> </TD>
</Tr>
<Tr>
<TD Height = "182" colspan = "2" align = "Left" valign = "TOP" bgcolor = "# ffffff" class = "info" style = "border-style: solid; border-color: #000080 "> <Div class =" info "id =" infotext "style =" width: 100%; Height: 177; overflow-Y: Auto ">
<P> This program can freely download Netease images .. </P>
<P> </P>
</Div> </TD>
</Tr>
<Tr>
<TD Height = "33" colspan = "2" align = "center" valign = "Middle" bgcolor = "# ffffff" class = "info" style = "border-style: solid; border-color: #000080 "> <input name =" add "type =" Submit "class =" s_button "id =" add "onclick =" show () "value =" Get File Information "/> </TD>
</Tr>
<Tr>
<TD Height = "33" align = "center" valign = "Middle" bgcolor = "# ffffff" style = "border-style: solid; border-color: #000080 "> <select name =" Atype "id =" Atype "onchange =" changevalue () ">
<Option value = "jpg"> color chart </option>
<Option value = "GIF"> animation </option>
</SELECT> </TD>
<TD Height = "33" align = "center" valign = "Middle" bgcolor = "# ffffff" style = "border-style: solid; border-color: #000080 "> <select name =" imagetype "id =" imagetype ">
<Option selected = "selected"> image type </option>
<Option> all </option>
<Option value = "90"> stunning scenery </option>
<Option value = "91"> Four Seasons flower </option>
<Option value = "89"> underwater world </option>
<Option value = "34"> stunning beauty </option>
<Option value = "198"> urban beauty </option>
<Option value = "200"> hand-drawn beauty </option>
</SELECT> </TD>
</Tr>
<Tr>
<TD Height = "33" colspan = "2" align = "center" valign = "Middle" bgcolor = "# ffffff" style = "border-style: solid; border-color: #000080 "> <input name =" del2 "type =" Submit "class =" s_button "id =" del2 "onclick =" downloadfile () "value =" Download selected items "/> </TD>
</Tr>
<Tr>
<TD Height = "33" colspan = "2" align = "center" valign = "Middle" bgcolor = "# ffffff" style = "border-style: solid; border-color: #000080 "> <input name =" Del "type =" Submit "class =" s_button "id =" Del "onclick =" tb_del () "value =" delete selected items "/> </TD>
</Tr>
<Tr>
<TD width = "5%" Height = "25" align = "center" valign = "Middle" bgcolor = "#000080" class = "style2" style = "border-style: solid; border-color: #000080 "> from </TD>
<TD width = "14%" bgcolor = "# ffffff" valign = "Middle" align = "center" style = "border-style: solid; border-color: #000080 "> <a Title =" Enter the start page number here ">
<Input name = "start1" type = "text" id = "start1" value = "1" size = "10"/>
</A> </TD>
</Tr>
<Tr>
<TD Height = "26" align = "center" valign = "Middle" bgcolor = "#000080" class = "style2" style = "border-style: solid; border-color: #000080 "> to </TD>
<TD Height = "26" align = "center" valign = "Middle" bgcolor = "# ffffff" style = "border-style: solid; border-color: #000080 "> <a Title =" Enter the end page number here ">
<Input name = "start2" type = "text" id = "start2" size = "10" value = "1"/>
</A> </TD>
</Tr>
</Table>
<Script language = "VBScript">
Public fileext
Str1 = "<tr> <TD> <SPAN class = 'grid1 '> <input type = checkbox id = 'sall' onclick = 'selectall () '> select all </span> </TD>"
Str1 = str1 & "<TD> <SPAN class = 'grid1 '> preview </span> </TD>"
Str1 = str1 & "<TD> <SPAN class = 'grid1 '> file path </span> </TD>"
Str1 = str1 & "<TD> <SPAN class = 'grid1 '> file name </span> </TD> </tr>"
Sub window_onload
Window. resizeTo 750,515
Ileft = (window. Screen. Width-750)/2
ITOP = (window. Screen. Height-515)/2
Window. moveTo ileft, iTOP
End sub
Function connect (Num)
Dim imageinfo, Length
Fileext = Atype. Options (Atype. selectedindex). Value
Imgtype = imagetype. Options (imagetype. selectedindex). Value
Imgtypenum = Atype. selectedindex
Url = "http://mms.163.com/new_web/cm_lv2_pic.jsp? Catid = "& imgtype &" & ord = ddate & page = "& num &" & type = "& imgtypenum &" & Key ="
Imageurl = "http://mmsimg.163.com/new_web/loaditem.jsp/type=" & imgtypenum & "/Path ="
Set HTTP = Createobject ("Microsoft. XMLHTTP ")
HTTP. Open "get", URL, false
HTTP. Send
Vin = http. responsebody
Strreturn = ""
For I = 1 to lenb (VIN)
Thischarcode = ASCB (midb (Vin, I, 1 ))
If thischarcode <& h80 then
Strreturn = strreturn & CHR (thischarcode)
Else
Nextcharcode = ASCB (midb (VIN, I + 1, 1 ))
Strreturn = strreturn & CHR (clng (thischarcode) * & h100 + CINT (nextcharcode ))
I = I + 1
End if
Next
'------ Get the file address ------------'
Do
Pos = instr (strreturn, "showpic ")
Pos1 = instr (strreturn, "128x128 ")
If POS> 0 then
Length = pos1-pos
Imageinfo = mid (strreturn, POs, length)
Images = Split (imageinfo ,",")
ImagePath = mid (images (2), 2, Len (images (2)-1) & "128x128." & fileext
'---------- Get the file name ------------'
Namepos = instr (strreturn, "\ n name :")
Namepos1 = instr (strreturn, "\ n popularity ")
Namelength = namepos1-namepos
Imagename = mid (strreturn, namepos, namelength), 6)
Strhtml = strhtml & "<tr> <TD> <SPAN class = 'grid2 '> <input id = addme type = checkbox> selected </span> </TD>"
Strhtml = strhtml & "<TD> <SPAN class = 'grid3 '> <a onmousemove = 'view ()' onmouseout = 'hideview () 'href = #> </a> </span> </TD>"
Strhtml = strhtml & "<TD> <SPAN class = 'grid2 '>" & ImagePath & "</span> </TD>"
Strhtml = strhtml & "<TD> <SPAN class = 'grid2 '>" & imagename & "</span> </TD> </tr>"
Strreturn = mid (strreturn, namepos1 + 20)
Else
Exit do
End if
Loop
Connect = strhtml
End Function
Function writeinner ()
For I = start1.value to start2.value
Strhtml = strhtml & connect (I)
Next
Strhtml = "<Table id = 'mytable' width = 100% border = 1 bordercolor = green>" & str1 & strhtml & "</table>"
List. innerhtml = strhtml
Infotext. innertext = infotext. innertext & "is successfully connected. "
Infotext. innertext = infotext. innertext & vbcrlf & "GIF image file information from page & start1.value &" to page & start2.value! "
End Function
Function show ()
If not (isnumeric (start2.value) or not (isnumeric (start2.value) then
Infotext. innertext = infotext. innertext & vbcrlf & "configuration error ..."
Else
Infotext. innertext = "Connecting ..."
Window. setTimeout "writeinner ()", 200
End if
End Function
Sub view ()
Strhtml1 = "Preview. runtimestyle. pixelleft = Window. event. x + 5
Preview. runtimestyle. pixeltop = Window. event. Y + 5
Preview. style. Visibility = "visible"
Preview. innerhtml = strhtml1
End sub
Sub hideview ()
Preview. style. Visibility = "hidden"
End sub
Sub addpro ()
Set OBJ = Window. event. srcelement. parentelement
If obj. cells (0). Children (0). Children (0). Checked = false then
OBJ. cells (0). Children (0). Children (0). Checked = true
Else
OBJ. cells (0). Children (0). Children (0). Checked = false
End if
End sub
Sub tb_del ()
Set OBJ = Document. All. nameditem ("mytable ")
If obj. Rows. length> 2 then
Set tagid = Document. All. nameditem ("addme") 'Get Object ID: delcheck'
For each otag in tagid
If otag. Checked then
Objrow = otag. parentelement. rowindex 'get the sequence number of the object ;'
OBJ. deleterow (objrow) 'delete this item ;'
End if
Next
Else
You can delete only one item in msgbox. How can this happen ?! ", 0," delete reminder"
Exit sub
End if
End sub
Sub selectall ()
Set OBJ = Document. All. nameditem ("mytable ")
Set objcheck = Document. All. nameditem ("Sall ")
Set tagid = Document. All. nameditem ("addme") 'Get Object ID: addme'
For each otag in tagid
Otag. Checked = objcheck. Checked
Next
End sub
Sub download ()
Set FSO = Createobject ("scripting. FileSystemObject ")
If not (FSO. folderexists ("★Netease downloads images★") Then
FSO. createfolder ("★Netease downloads images★")
End if
Set HTTP = Createobject ("Microsoft. XMLHTTP ")
Set OBJ = Document. All. nameditem ("mytable ")
Set tagid = Document. All. nameditem ("addme") 'Get Object ID: delcheck'
For each otag in tagid
If otag. Checked then
Set objrow = otag. parentelement 'get the row of the object ;'
Downurl = objrow. cells (1). Children (0). Children (0). Children (0). SRC
Filename = objrow. cells (3). Children (0). innertext
HTTP. Open "get", downurl, false
HTTP. Send
Set Aso = Createobject ("ADODB. Stream ")
Aso. type = 1
Aso. Open
Aso. Write HTTP. responsebody
Aso. savetofile"★Netease downloads images★\ "& Filename &". "& fileext, 2
Aso. Close
End if
Next
Infotext. innertext = infotext. innertext & vbcrlf & "is successfully downloaded. "
Infotext. innertext = infotext. innertext & vbcrlf & "file stored in:" & vbcrlf & ""★Netease downloads images★"Lower"
End sub
Sub downloadfile ()
Infotext. innertext = "downloading file ...."'"
Window. setTimeout "download ()", 200
End sub
Sub changevalue ()
Aid = array ("130", "112", "67", "14", "122", "158 ")
PID = array ("90", "91", "89", "34", "198", "200 ")
If Atype. selectedindex = 0 then
For I = 0 to 5
Imagetype. Options (I + 2). value = PID (I)
Next
Else
For I = 0 to 5
Imagetype. Options (I + 2). value = aid (I)
Next
End if
End sub
</SCRIPT>