Capture mouse click event inside a iframe using authotkey

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
gongnl
Posts: 96
Joined: 05 Jan 2015, 03:57
Location: /gongnltmp/

Capture mouse click event inside a iframe using authotkey

23 Mar 2017, 08:39

I want to Capture mouse click event inside a iframe using authotkey, but fdoc.parentWindow.event.srcElement.OuterHtml is a Invalid variable. who help me ?
thank

Code: Select all

#SingleInstance force
#Persistent

pwb := WBGet()
frmwin := pwb.document.getElementById("mainFrame").contentWindow
frame := ComObj(9,ComObjQuery(frmwin,"{332C4427-26CB-11D0-B483-00C04FD90119}","{332C4427-26CB-11D0-B483-00C04FD90119}"),1)
fdoc := frame.Document
ComObjConnect(fdoc, "fdoc_") 
return

fdoc_OnClick(fdoc) {
	MsgBox, % fdoc.parentWindow.event.srcElement.OuterHtml
}
User avatar
SnowFlake
Posts: 368
Joined: 28 Apr 2015, 05:41
Contact:

Re: Capture mouse click event inside a iframe using authotkey

11 Apr 2017, 16:10

could you link to the site you want to click on? or is it a work site/private?
:yawn:
gongnl
Posts: 96
Joined: 05 Jan 2015, 03:57
Location: /gongnltmp/

Re: Capture mouse click event inside a iframe using authotkey

08 May 2017, 07:23

SnowFlake wrote:could you link to the site you want to click on? or is it a work site/private?
when I click on element in qq mail login frame, but not return doc.parentWindow.event.srcElement.OuterHtml

Code: Select all

#Persistent
wb := ComObjCreate("InternetExplorer.Application")
wb.visible := True
wb.Navigate("https://en.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
}
Last edited by gongnl on 08 May 2017, 07:31, edited 1 time in total.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Chunjee, drwill, Google [Bot] and 215 guests