复制代码 代码如下:
<TITLE>网易文件摄取</TITLE>
<metahttp-equiv="Content-Type"content="text/html;charset=gb2312">
<HTA:APPLICATION
ID="MyhyliApp"
APPLICATIONNAME="设置程序"
VERSION="1.0"
SCROLL="no"
INNERBORDER="no"
CONTEXTMENU="no"
CAPTION="yes"
SHOWINTASKBAR="yes"
SINGLEINSTANCE="yes"
SYSMENU="yes"
WINDOWSTATE="normal"
NAVIGABLE="yes"
/>
<styletype="text/css">
<>
</style>
<divclass="separator">
<hr>
</div>
<tablewidth="100%"height="4%"border="0"cellspacing="0"cellpadding="0">
<tr>
<tdcolspan="2"align="center"valign="middle"id=menubaronselectstart="returnfalse"><spanclass="TT1"id="consume">网易图片文件一览表</span></td>
</tr>
</table>
<divclass="separator">
<hr>
</div>
<tablewidth="100%"height="415"border="1">
<tr>
<tdwidth="81%"height="16"rowspan="8"valign="top"bgcolor="#FFFFFF"style="border-style:solid;border-color:#000080"><divclass="info"id=liststyle="width:100%;height:405;overflow-y:auto;border:solid1gray;"></div></td>
<tdheight="16"colspan="2"align="center"valign="middle"bordercolor="#FF0000"bgcolor="#000080"style="border-style:solid;border-color:#000080"><divclass="preview"id="preview">
<p></p>
</div>
<spanclass="STYLE2">信息公布</span></td>
</tr>
<tr>
<tdheight="182"colspan="2"align="left"valign="top"bgcolor="#FFFFFF"class="info"style="border-style:solid;border-color:#000080"><divclass="info"id="infotext"style="width:100%;height:177;overflow-y:auto">
<p>本程序可以自由下载网易图片..</p>
<p></p>
</div></td>
</tr>
<tr>
<tdheight="33"colspan="2"align="center"valign="middle"bgcolor="#FFFFFF"class="info"style="border-style:solid;border-color:#000080"><inputname="add"type="submit"class="s_button"id="add"onclick="show()"value="取文件信息"/></td>
</tr>
<tr>
<tdheight="33"align="center"valign="middle"bgcolor="#FFFFFF"style="border-style:solid;border-color:#000080"><selectname="Atype"id="Atype"onchange="changevalue()">
<optionvalue="jpg">彩图</option>
<optionvalue="gif">动画</option>
</select></td>
<tdheight="33"align="center"valign="middle"bgcolor="#FFFFFF"style="border-style:solid;border-color:#000080"><selectname="imagetype"id="imagetype">
<optionselected="selected">图片类型</option>
<option>全部</option>
<optionvalue="90">绝色风光</option>
<optionvalue="91">四季花语</option>
<optionvalue="89">海底世界</option>
<optionvalue="34">绝色美女</option>
<optionvalue="198">都市丽人</option>
<optionvalue="200">手绘美女</option>
</select></td>
</tr>
<tr>
<tdheight="33"colspan="2"align="center"valign="middle"bgcolor="#FFFFFF"style="border-style:solid;border-color:#000080"><inputname="del2"type="submit"class="s_button"id="del2"onclick="downloadfile()"value="下载选定项"/></td>
</tr>
<tr>
<tdheight="33"colspan="2"align="center"valign="middle"bgcolor="#FFFFFF"style="border-style:solid;border-color:#000080"><inputname="del"type="submit"class="s_button"id="del"onclick="tb_del()"value="删除选定项"/></td>
</tr>
<tr>
<tdwidth="5%"height="25"align="center"valign="middle"bgcolor="#000080"class="STYLE2"style="border-style:solid;border-color:#000080">从</td>
<tdwidth="14%"bgcolor="#FFFFFF"valign="middle"align="center"style="border-style:solid;border-color:#000080"><atitle="在此处输入起始页数"><inputname="start1"type="text"id="start1"value="1"size="10"/>
</a></td>
</tr>
<tr>
<tdheight="26"align="center"valign="middle"bgcolor="#000080"class="STYLE2"style="border-style:solid;border-color:#000080">到</td>
<tdheight="26"align="center"valign="middle"bgcolor="#FFFFFF"style="border-style:solid;border-color:#000080"><atitle="在此处输入结束页数"><inputname="start2"type="text"id="start2"size="10"value="1"/>
</a></td>
</tr>
</table>
<scriptlanguage="vbscript">
publicfileext
str1="<tr><td><spanclass='grid1'><inputtype=checkboxid='sall'onclick='selectall()'>全都选</span></td>"
str1=str1&"<td><spanclass='grid1'>预览</span></td>"
str1=str1&"<td><spanclass='grid1'>文件路径</span></td>"
str1=str1&"<td><spanclass='grid1'>文件名称</span></td></tr>"
SubWindow_onLoad
window.resizeTo750,515
ileft=(window.screen.width-750)/2
itop=(window.screen.height-515)/2
window.moveToileft,itop
endsub
functionconnect(num)
dimimageinfo,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="
sethttp=createobject("Microsoft.XMLHTTP")
http.open"GET",url,False
http.send
vIn=http.ResponseBody
strReturn=""
Fori=1ToLenB(vIn)
ThisCharCode=AscB(MidB(vIn,i,1))
IfThisCharCode<&H80Then
strReturn=strReturn&Chr(ThisCharCode)
Else
NextCharCode=AscB(MidB(vIn,i+1,1))
strReturn=strReturn&Chr(CLng(ThisCharCode)*&H100+CInt(NextCharCode))
i=i+1
EndIf
Next
'------获取文件的地址------------'
do
pos=instr(strReturn,"showPic")
pos1=instr(strReturn,"128x128")
ifpos>0then
length=pos1-pos
imageinfo=mid(strReturn,pos,length)
images=split(imageinfo,",")
imagepath=mid(images(2),2,len(images(2))-1)&"128x128."&fileext
'----------获取文件的名字------------'
namepos=instr(strReturn,"n名字:")
namepos1=instr(strReturn,"n人气")
namelength=namepos1-namepos
imagename=mid(mid(strReturn,namepos,namelength),6)
strHTML=strHTML&"<tr><td><spanclass='grid2'><inputid=addmetype=checkbox>选定</span></td>"
strHTML=strHTML&"<td><spanclass='grid3'><aonMousemove='view()'onmouseout='hideview()'href=#><imgonClick='addpro()'src='"&imageurl&imagepath&"'width=30height=20></a></span></td>"
strHTML=strHTML&"<td><spanclass='grid2'>"&imagepath&"</span></td>"
strHTML=strHTML&"<td><spanclass='grid2'>"&imagename&"</span></td></tr>"
strReturn=mid(strReturn,namepos1+20)
else
exitdo
endif
loop
connect=strHTML
endfunction
functionwriteinner()
fori=start1.valuetostart2.value
strHTML=strHTML&connect(i)
next
strHTML="<tableid='mytable'width=100%border=1bordercolor=green>"&str1&strHTML&"</table>"
list.innerHTML=strHTML
infotext.innertext=infotext.innertext&"连接成功。"
infotext.innertext=infotext.innertext&vbcrlf&vbcrlf&"从第"&start1.value&"页到第"&start2.value&"页的gif图片文件信息!"
endfunction
functionshow()
ifnot(isnumeric(start2.value))ornot(isnumeric(start2.value))then
infotext.innertext=infotext.innertext&vbcrlf&"配置错误..."
else
infotext.innertext="正在连接..."
window.settimeout"writeinner()",200
endif
endfunction
subview()
strHTML1="<imgsrc='"&window.event.srcElement.src&"'width='140'height='140'>"
preview.runtimeStyle.pixelLeft=window.event.x+5
preview.runtimeStyle.pixelTop=window.event.y+5
preview.style.visibility="visible"
preview.innerHTML=strHTML1
endsub
subhideview()
preview.style.visibility="hidden"
endsub
subaddpro()
setobj=window.event.srcElement.parentelement.parentelement.parentelement.parentelement
ifobj.cells(0).children(0).children(0).checked=falsethen
obj.cells(0).children(0).children(0).checked=true
else
obj.cells(0).children(0).children(0).checked=false
endif
endsub
subtb_del()
setobj=document.all.namedItem("mytable")
ifobj.rows.length>2then
SettagID=document.all.namedItem("addme")'获取对象ID:delcheck'
foreachotagintagID
ifotag.checkedthen
objrow=otag.parentelement.parentelement.parentelement.rowindex'获取对象的行序数;'
obj.deleteRow(objrow)'删除该项;'
endif
next
else
msgbox"才一项你都删,哪有这样的?!",0,"删除提醒"
exitsub
endif
endsub
subselectall()
setobj=document.all.namedItem("mytable")
setobjcheck=document.all.namedItem("sall")
SettagID=document.all.namedItem("addme")'获取对象ID:addme'
foreachotagintagID
otag.checked=objcheck.checked
next
endsub
subdownload()
Setfso=CreateObject("Scripting.FileSystemObject")
Ifnot(fso.FolderExists("★网易下载图片★"))Then
fso.createfolder("★网易下载图片★")
endif
sethttp=createobject("Microsoft.XMLHTTP")
setobj=document.all.namedItem("mytable")
SettagID=document.all.namedItem("addme")'获取对象ID:delcheck'
foreachotagintagID
ifotag.checkedthen
setobjrow=otag.parentelement.parentelement.parentelement'获取对象的行;'
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
setaso=createobject("ADODB.Stream")
aso.type=1
aso.open
aso.writehttp.ResponseBody
aso.savetofile"★网易下载图片★"&filename&"."&fileext,2
aso.close
endif
next
infotext.innertext=infotext.innertext&vbcrlf&"文件下载成功。"
infotext.innertext=infotext.innertext&vbcrlf&"文件保存在:"&vbcrlf&"“★网易下载图片★”下"
endsub
subdownloadfile()
infotext.innertext="正在下载文件...."'"
window.settimeout"download()",200
endsub
subchangevalue()
AID=array("130","112","67","14","122","158")
PID=array("90","91","89","34","198","200")
ifAtype.selectedindex=0then
fori=0to5
imagetype.options(i+2).value=PID(i)
next
else
fori=0to5
imagetype.options(i+2).value=AID(i)
next
endif
endsub
</script>