Jump to content

OnMouseOver Event


Recommended Posts

I managed to handle the event, but I dont get how to get the object that has fired the event,

here is my script:

#include <IE.au3>
HotKeySet('{ESC}', 'Close')
$oIE = _IECreate('http://www.autoitscript.com/')
$oDocument = _IEDocGetObj($oIE)
ObjEvent($oDocument, 'IEFunc_', 'HTMLDocumentEvents')
If @error Then
    MsgBox(0, '', 'ObjEvent error')
    Exit
EndIf

While 1
    Sleep(10)
WEnd

Func IEFunc_onmouseover()
    MsgBox(0, '', '')
EndFunc  ;==>IEFunc_onmouseover

Func Close()
    Exit
EndFunc  ;==>Close

here are the informations

http://msdn.microsoft.com/en-us/library/aa743131(VS.85).aspx

if u scroll down the page there is "IHTMLEventObj::fromElement", that is the property I need, any help?

Link to comment
Share on other sites

I think you have to trap for each object but if your approach works than @COM_EventObj will help you further

For $oTag in $oTags

$oEvents[$i] = ObjEvent($oTag, "IE_Evt_")

$tStyle = $oTag.style.border

consolewrite("tstyle:" & $tStyle & @LF)

$i += 1

ReDim $oEvents[$i + 1]

Next

Func IE_Evt_onmouseover()

$o = @COM_EventObj

ConsoleWrite($o.tagname & " : " & $o.id & $o.innerhtml & $o.type & @LF)

endfunc

Link to comment
Share on other sites

I think you have to trap for each object but if your approach works than @COM_EventObj will help you further

For $oTag in $oTags

$oEvents[$i] = ObjEvent($oTag, "IE_Evt_")

$tStyle = $oTag.style.border

consolewrite("tstyle:" & $tStyle & @LF)

$i += 1

ReDim $oEvents[$i + 1]

Next

Func IE_Evt_onmouseover()

$o = @COM_EventObj

ConsoleWrite($o.tagname & " : " & $o.id & $o.innerhtml & $o.type & @LF)

endfunc

it returns only "html"
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...