是实现页面中的弹出菜单,获得连接内容?
不麻烦!
常见一个 .html 文件,将菜单的超级连接指向它,文件中用VBScript写段代码
取出来,NetAnts, FlushGet 的目录中都有类似文件,再在注册表中查一下,
你也可以实现了。
只有FlushGet的下载单个文件用的:
《script language="VBScript"》
'Great thanks to Vladimir Romanov(Author of ReGet Pro)
'Download selected link
Sub AddLink(Url,Info)
On Error Resume Next
set JetCarCatch=CreateObject("JetCar.Netscape")
if err<>0 then
MsgBox("FlashGet not properly installed!"+ vbCrLf+"Please install FlashGet again")
else
call JetCarCatch.AddUrl(Url, Info, external.menuArguments.document.Url)
end if
end sub
Sub OnContextMenu()
set srcEvent = external.menuArguments.event
set EventElement = external.menuArguments.document.elementFromPoint ( srcEvent.clientX, srcEvent.clientY )
if srcEvent.type = "MenuExtAnchor" then
set srcAnchor = EventElement
do until TypeName(srcAnchor)="HTMLAnchorElement"
set srcAnchor=srcAnchor.parentElement
Loop
Call AddLink(srcAnchor.href,srcAnchor.innerText)
else
if srcEvent.type="MenuExtImage" then
if TypeName(EventElement)="HTMLAreaElement" then
Call AddLink(EventElement.href,EventElement.Alt)
else
set srcImage = EventElement
set srcAnchor = srcImage.parentElement
do until TypeName(srcAnchor)="HTMLAnchorElement"
set srcAnchor=srcAnchor.parentElement
if TypeName(srcAnchor)="Nothing" then
call AddLink(srcImage.href,srcImage.Alt)
exit sub
end if
Loop
Call AddLink(srcAnchor.href,srcImage.Alt)
end if
else
if srcEvent.type="MenuExtUnknown" then
set srcAnchor = EventElement
do until TypeName(srcAnchor)="HTMLAnchorElement"
set srcAnchor=srcAnchor.parentElement
if TypeName(srcAnchor)="Nothing" then
Call AddLink(EventElement.href,EventElement.innerText)
exit sub
end if
Loop
Call AddLink(srcAnchor.href,srcAnchor.innerText)
else
if 1=1 then
MsgBox("Unknown Event Source """ + srcEvent.type + """" + vbCrLf + "Please send description of error to jetcar@163.net")
end if
end sub
call OnContextMenu()
《/script》