点击网页中指定的链接时,触发ahk脚本执行,能否给个实例?
Moderators: tmplinshi, arcticir
点击网页中指定的链接时,触发ahk脚本执行,能否给个实例?
请教大神,点击ie网页中指定的链接时,触发ahk脚本提取打开的网页中的字段,能否给个实例,谢谢
Re: 点击网页中指定的链接时,触发ahk脚本执行,能否给个实例?
我找了个类似例子:
修改如下:
ok
Code: Select all
Gui Add, ActiveX, w500 h300 vwb, Shell.Explorer
wb.Navigate("http://ahkscript.org")
while wb.busy
sleep 100
doc := wb.document
ComObjConnect(doc, "Doc_")
Gui, Show
Return
GuiClose:
ExitApp
Doc_OnClick(doc) {
MsgBox, % doc.parentWindow.event.srcElement.OuterHtml
}
Code: Select all
#Persistent
wb := ComObjCreate("InternetExplorer.Application")
wb.Navigate("http://www.baidu.com")
while wb.busy
sleep 100
doc := wb.document
ComObjConnect(doc, "Doc_")
Return
Doc_OnClick(doc) {
MsgBox, % doc.parentWindow.event.srcElement.OuterHtml
}
Re: 点击网页中指定的链接时,触发ahk脚本执行,能否给个实例?
当点击qq邮箱登录页面frame中的 元素时,却无法返回doc.parentWindow.event.srcElement.OuterHtml信息,请教高手将如何返回点击处的元素连接
代码如下:
代码如下:
Code: Select all
#Persistent
wb := ComObjCreate("InternetExplorer.Application")
wb.visible := True
wb.Navigate("https://mail.qq.com/cgi-bin/loginpage")
while wb.busy
sleep 100
doc := wb.document
ComObjConnect(doc, "Doc_")
Return
Doc_OnClick(doc) {
MsgBox, % doc.parentWindow.event.srcElement.OuterHtml
}
Who is online
Users browsing this forum: No registered users and 51 guests