正文内容 评论(0)
有时在网上看到很多漂亮的图片,真恨不得将它们倾收囊中。一般情况下,我们先用迅雷的“使用迅雷下载全部链接”功能,再手工选择图片类型,这样做步骤较多。事实上,网络上多数的图片是JPG格式的,我们只要自己动手,很简单地操作就能做到一步保存页面美图。甚至也能请电脑高手做好,然后将这个功能“安装”到你的迅雷5上,相当酷!
第一步:复制相应文件
先进入X:\Program Files\Thunder Network\Thunder\Program文件夹,选中getAllurl.htm,按下Ctrl+C,再按下Ctrl+V,将会生成“getAllurl - 复制.htm”文件。选中它,按下F2键,将其重命名为getAlljpg.htm。
第二步:修改相应代码
右击getAlljpg.htm文件,选择“打开方式”→“记事本”(如图1),用“记事本”打开它。
再按下Ctrl+A键选中所有字符,按下Del将其删除掉,然后输入如下内容:
<script language="VBScript">
Sub OnContextMenu()
set ThunderAgent = CreateObject("ThunderAgent.Agent.1")
set links = external.menuArguments.document.links
set images = external.menuArguments.document.images
link_count = links.length
image_count = images.length
strDownloadPage = external.menuArguments.document.url
set theDownloadPage = external.menuArguments.document.getElementById("thunder_down_pageurl")
if TypeName(theDownloadPage) <> "Nothing" then
strDownloadPage = theDownloadPage.value
end if
strStatPage = ""
set theStatPage = external.menuArguments.document.getElementById("thunder_stat_pageurl")
if TypeName(theStatPage) <> "Nothing" then
strStatPage = theStatPage.value
end if
Dim picNum
if strStatPage <> "" then
for i = 0 to link_count-1
If Right(links(i).href , 3)="jpg" Or Right(links(i).href , 3)="Jpg" Or Right(links(i).href , 3)="JPG" Then
picNum = picNum + 1
call ThunderAgent.AddTask4(links(i).href, "photo-" + CStr(picNum) + ".jpg", "", links(i).innerText, strDownloadPage, -1, 0, -1, external.menuArguments.document.cookie, "", strStatPage)
End If
Next
for i = 0 to image_count-1
If Right(images(i).src , 3)="jpg" Or Right(images(i).src , 3)="Jpg" Or Right(images(i).src , 3)="JPG" Then
picNum = picNum + 1
call ThunderAgent.AddTask4(images(i).src, "photo-" + CStr(picNum) + ".jpg", "", images(i).innerText, strDownloadPage, -1, 0, -1, external.menuArguments.document.cookie, "", strStatPage)
End If
next
else
for i = 0 to link_count-1
If Right(links(i).href , 3)="jpg" Or Right(links(i).href , 3)="Jpg" Or Right(links(i).href , 3)="JPG" Then
picNum = picNum + 1
call ThunderAgent.AddTask4(links(i).href, "photo-" + CStr(picNum) + ".jpg", "", links(i).innerText, strDownloadPage, -1, 0, -1, external.menuArguments.document.cookie, "", "")
End If
Next
for i = 0 to image_count-1
If Right(images(i).src , 3)="jpg" Or Right(images(i).src , 3)="Jpg" Or Right(images(i).src , 3)="JPG" Then
picNum = picNum + 1
call ThunderAgent.AddTask4(images(i).src, "photo-" + CStr(picNum) + ".jpg", "", images(i).innerText, strDownloadPage, -1, 0, -1, external.menuArguments.document.cookie, "", "")
End If
next
end If
call ThunderAgent.CommitTasks2(1)
set ThunderAgent = nothing
end Sub
call OnContextMenu()
</script>
最后,选择“文件”→“保存”命令将其保存(如图2)。
本文收录在
#戴尔
- 热门文章
- 换一波
- 好物推荐
- 换一波
- 关注我们
-
微博:快科技官方
快科技官方微博 -
今日头条:快科技
带来硬件软件、手机数码最快资讯! -
抖音:kkjcn
科技快讯、手机开箱、产品体验、应用推荐...