点击网页中指定的链接时,触发ahk脚本执行,能否给个实例?
Posted: 20 Mar 2017, 04:12
请教大神,点击ie网页中指定的链接时,触发ahk脚本提取打开的网页中的字段,能否给个实例,谢谢
Let's help each other out
https://www.autohotkey.com/boards/
https://www.autohotkey.com/boards/viewtopic.php?f=27&t=29398
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
}
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
}