milos83 Posted January 13, 2014 Share Posted January 13, 2014 (edited) Hu guys, Regarding ObjEvent usage on IE (IE.au3). If I use ObjEvent(_IEGetObjById($oIE, "btn1"), "_MyBTN_", "HTMLAnchorEvents2") Func _MyBTN_onclick() ConsoleWrite("Clicked" & @LF) Endfunc to listen for a click on a element, how can I retrieve its attributes. For example ID, outertext, or Value ? If yes, can I do ObjEvent on a body and then catch all elements clicked and parse them in a loop? This would allow me to use only one function for all the elements. Thanks Edited January 15, 2014 by milos83 Link to comment Share on other sites More sharing options...
milos83 Posted January 15, 2014 Author Share Posted January 15, 2014 Anybody? Thanks in advance. Link to comment Share on other sites More sharing options...
JohnOne Posted January 15, 2014 Share Posted January 15, 2014 I pretty sure you cannot use ObjEvent in that fashion. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
milos83 Posted January 15, 2014 Author Share Posted January 15, 2014 (edited) Hi John. Why are you so sure? I am not quite familiar with this but as I can see that once set, ObjEvent can pass a lot of parameters. Like in the example below. Local $oIEEvents = ObjEvent($oIE, "_IEEvent_", "DWebBrowserEvents2"); BeforeNavigate2 method definition Func _IEEvent_BeforeNavigate2($IEpDisp, $IEURL, $IEFlags, $IETargetFrameName, $IEPostData, $IEHeaders, $IECancel) ConsoleWrite("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!--BeforeNavigate2 fired--!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! " & @CRLF & _ "$IEpDisp = " & $IEpDisp() & " - " & ObjName($IEpDisp) & @CRLF & _ ; e.g. default property and name for the object "$IEURL = " & $IEURL & @CRLF & _ "$IEFlags = " & $IEFlags & @CRLF & _ "$IETargetFrameName = " & $IETargetFrameName & @CRLF & _ "$IEPostData = " & $IEPostData & @CRLF & _ "$IEHeaders = " & $IEHeaders & @CRLF & _ "$IECancel = " & $IECancel & @CRLF & _ "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! " & @CRLF & @CRLF) EndFunc ;==>_IEEvent_BeforeNavigate2 I googled a lot about this. MS site has some info, but where do I find what parameters will ObjEvent send to the function? In javascript you can receive element ID like this: onclick="MyIdIs(this.id)" Thanks BTW. Are you The John? Edited January 15, 2014 by milos83 Link to comment Share on other sites More sharing options...
JohnOne Posted January 15, 2014 Share Posted January 15, 2014 http://msdn.microsoft.com/en-us/library/ie/aa768283?v=vs.85.aspx AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
trancexx Posted January 15, 2014 Share Posted January 15, 2014 (edited) Of course you can attach event handler:#include <IE.au3> Local $oIE = _IECreate("http://google.com") Local $oButton = _IEGetObjById ($oIE, "gbqfba") ; search button (probably) ConsoleWrite(ObjName($oButton) & @CRLF) ConsoleWrite(ObjName($oButton, 4) & @CRLF) ; File with Interface defs ConsoleWrite(ObjName($oButton, 6) & @CRLF) ; CLSID of the object's coclass ; Event object Local $oEvent = ObjEvent($oButton, "_MY_EVENT_HANDLER_") Sleep(10000) _IEQuit($oIE) Func _MY_EVENT_HANDLER_onclick($oEvtObj) ConsoleWrite("!!!!!CLICKED THE BUTTON" & @CRLF) MsgBox(4096, "Yay JohnOne!", "You clicked the button.") EndFunc If you look at that code and see what it prints you will get the name of the object, file with interface definition and CLSID of the object's coclass.Then all you have to do is find script called TLBViewer.au3 in the examples forum and load it with the file that you got (and then save data to some text file) and then find CLSID and look for which event interfaces it implements (it will be something like "// Implemented interface: <IDispatch> HTMLButtonElementEvents" and whatnot. Then find definition of that interface by scrolling up or down an read what events you can catch. Edited January 15, 2014 by trancexx JohnOne 1 ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
JohnOne Posted January 15, 2014 Share Posted January 15, 2014 Well blow me down, I never knew that. Pretty cool. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
milos83 Posted January 15, 2014 Author Share Posted January 15, 2014 Thanks Transexx. That looks really interesting, but it seems I am lost... ================================================================================== coclass HTMLAnchorElement; CLSID = {3050F248-98B5-11CF-BB82-00AA00BDCE0B}; // Implemented interface: <IDispatch> DispHTMLAnchorElement // Implemented interface: <IDispatch> HTMLAnchorEvents // Implemented interface: <IDispatch> HTMLAnchorEvents2 // Implemented interface: <IDispatch> IHTMLElement // Implemented interface: <IDispatch> IHTMLElement2 // Implemented interface: <IDispatch> IHTMLElement3 // Implemented interface: <IDispatch> IHTMLElement4 // Implemented interface: <IDispatch> IHTMLUniqueName // Implemented interface: <IDispatch> IHTMLDOMNode // Implemented interface: <IDispatch> IHTMLDOMNode2 ================================================================================== Tried all of them and none worked ObjEvent($oButton, "_MY_EVENT_HANDLER_", "IHTMLDOMNode") This is a small part whats above 471. STDCALL PROPERTYGET DISPATCH; BSTR ie8_shape( ); 472. STDCALL PROPERTYPUTREF DISPATCH; VOID ie8_coords( BSTR v ); 473. STDCALL PROPERTYGET DISPATCH; BSTR ie8_coords( ); 474. STDCALL PROPERTYPUTREF DISPATCH; VOID ie8_href( BSTR v ); 475. STDCALL PROPERTYGET DISPATCH; BSTR ie8_href( ); and below IDispatch HTMLLabelEvents2; IID = {3050F61C-98B5-11CF-BB82-00AA00BDCE0B}; // Inherits from: IDispatch {00020400-0000-0000-C000-000000000046} 1. STDCALL FUNC DISPATCH; bool onhelp( [in] <IDispatch> IHTMLEventObj* pEvtObj ); 2. STDCALL FUNC DISPATCH; bool onclick( [in] <IDispatch> IHTMLEventObj* pEvtObj ); 3. STDCALL FUNC DISPATCH; bool ondblclick( [in] <IDispatch> IHTMLEventObj* pEvtObj ); 4. STDCALL FUNC DISPATCH; bool onkeypress( [in] <IDispatch> IHTMLEventObj* pEvtObj ); What exactly am I looking for? Thanks Link to comment Share on other sites More sharing options...
milos83 Posted January 15, 2014 Author Share Posted January 15, 2014 http://msdn.microsoft.com/en-us/library/ie/aa768283?v=vs.85.aspx I already searched all across those pages. No help there. Thanks anyway Link to comment Share on other sites More sharing options...
milos83 Posted January 15, 2014 Author Share Posted January 15, 2014 (edited) Actually @trancexx I wanna make sure we understand each other. Is it possible to do this kind of thing? ObjEvent($oButton1, "_MY_EVENT_HANDLER_") ObjEvent($oButton2, "_MY_EVENT_HANDLER_") ;<-- button 2 same handler func _MY_EVENT_HANDLER_OnClick($objID) ConsoleWrite("Button clicked is" & $objID) Endfunc or if I can get an object and then do $objID.id If its too complicated I'll quit from this concept and I'll do it with each object own handler. Let me know what you think. Edited January 16, 2014 by milos83 Link to comment Share on other sites More sharing options...
bogQ Posted January 16, 2014 Share Posted January 16, 2014 similar topic TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
trancexx Posted January 16, 2014 Share Posted January 16, 2014 (edited) It's not about whether it's complicated or not, it's about how it should be done.That other thing is how it should be done:expandcollapse popupLocal $sHtml = '<body> <a id="idLink" href="#" title="Link" >Click me</a> <br><br> <button id="idButton" title="Button" >Click me</button> </body>' Local $oIE = ObjCreate("InternetExplorer.Application") $oIE.navigate("about:blank") Sleep(200) ; lame $oIE.document.write($sHtml) $oIE.visible = True Local $oDoc = $oIE.document ConsoleWrite(@error & @CRLF) Local $oLink1 = $oIE.document.getElementById("idLink") Local $oButton2 = $oIE.document.getElementById("idButton") ; Event objects Local $oEventBrowser = ObjEvent($oIE, "Browser_", "DWebBrowserEvents2") Local $oEventLink1 = ObjEvent($oLink1, "Link1_") Local $oEventButton2 = ObjEvent($oButton2, "Button2_") ;----------------------------------------------- While Sleep(100) WEnd ; THE END ;----------------------------------------------- ;Events for browser Func Browser_OnQuit() Exit EndFunc ; Events for link Func Link1_onclick($oEvtObj) $oIE.document.getElementById("idLink").innerhtml = "You clicked me" EndFunc Func Link1_onmouseover($oEvtObj) $oIE.document.getElementById("idLink").innerhtml = "Hovering" EndFunc Func Link1_onmouseout($oEvtObj) $oIE.document.getElementById("idLink").innerhtml = "Not Hovering" EndFunc ; Events for button Func Button2_onmouseover($oEvtObj) $oIE.document.getElementById("idButton").innerhtml = "Hovering Button (click to Exit)" EndFunc Func Button2_onmouseout($oEvtObj) $oIE.document.getElementById("idButton").innerhtml = "Not Hovering Button (click to Exit)" EndFunc Func Button2_onclick($oEvtObj) $oIE.Quit() Exit EndFuncOr even better:expandcollapse popupGlobal $oIE = ObjCreate("InternetExplorer.Application") Local $oEventBrowser = ObjEvent($oIE, "Browser_", "DWebBrowserEvents2") Local $oEventLink1, $oEventButton2 ; to collect event objects to $oIE.navigate("about:blank") ;----------------------------------------------- While Sleep(100) WEnd ; THE END ;----------------------------------------------- Func Customize($oBrowser, ByRef $oEventLink1, ByRef $oEventButton2) Local $sHtml = '<body> <a id="idLink" href="#" title="Link" >Click me</a> <br><br> <button id="idButton" title="Button" >Click me</button> </body>' Local $oDoc = $oBrowser.document $oDoc.write($sHtml) $oBrowser.visible = True Local $oLink1 = $oDoc.getElementById("idLink") Local $oButton2 = $oDoc.getElementById("idButton") ; Event objects $oEventLink1 = ObjEvent($oLink1, "Link1_") $oEventButton2 = ObjEvent($oButton2, "Button2_") EndFunc ;Events for browser Func Browser_OnQuit() Exit EndFunc Func Browser_DocumentComplete($oDisp, $sUrl) Customize($oDisp, $oEventLink1, $oEventButton2) EndFunc ; Events for link Func Link1_onclick($oEvtObj) $oIE.document.getElementById("idLink").innerhtml = "You clicked me" EndFunc Func Link1_onmouseover($oEvtObj) $oIE.document.getElementById("idLink").innerhtml = "Hovering" EndFunc Func Link1_onmouseout($oEvtObj) $oIE.document.getElementById("idLink").innerhtml = "Not Hovering" EndFunc ; Events for button Func Button2_onmouseover($oEvtObj) $oIE.document.getElementById("idButton").innerhtml = "Hovering Button (click to Exit)" EndFunc Func Button2_onmouseout($oEvtObj) $oIE.document.getElementById("idButton").innerhtml = "Not Hovering Button (click to Exit)" EndFunc Func Button2_onclick($oEvtObj) $oIE.Quit() Exit EndFunc Edited January 16, 2014 by trancexx mLipok, robertocm and JohnOne 3 ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
milos83 Posted January 16, 2014 Author Share Posted January 16, 2014 (edited) It's not about whether it's complicated or not, it's about how it should be done. That other thing is how it should be done: expandcollapse popupLocal $sHtml = '<body> <a id="idLink" href="#" title="Link" >Click me</a> <br><br> <button id="idButton" title="Button" >Click me</button> </body>' Local $oIE = ObjCreate("InternetExplorer.Application") $oIE.navigate("about:blank") Sleep(200) ; lame $oIE.document.write($sHtml) $oIE.visible = True Local $oDoc = $oIE.document ConsoleWrite(@error & @CRLF) Local $oLink1 = $oIE.document.getElementById("idLink") Local $oButton2 = $oIE.document.getElementById("idButton") ; Event objects Local $oEventBrowser = ObjEvent($oIE, "Browser_", "DWebBrowserEvents2") Local $oEventLink1 = ObjEvent($oLink1, "Link1_") Local $oEventButton2 = ObjEvent($oButton2, "Button2_") ;----------------------------------------------- While Sleep(100) WEnd ; THE END ;----------------------------------------------- ;Events for browser Func Browser_OnQuit() Exit EndFunc ; Events for link Func Link1_onclick($oEvtObj) $oIE.document.getElementById("idLink").innerhtml = "You clicked me" EndFunc Func Link1_onmouseover($oEvtObj) $oIE.document.getElementById("idLink").innerhtml = "Hovering" EndFunc Func Link1_onmouseout($oEvtObj) $oIE.document.getElementById("idLink").innerhtml = "Not Hovering" EndFunc ; Events for button Func Button2_onmouseover($oEvtObj) $oIE.document.getElementById("idButton").innerhtml = "Hovering Button (click to Exit)" EndFunc Func Button2_onmouseout($oEvtObj) $oIE.document.getElementById("idButton").innerhtml = "Not Hovering Button (click to Exit)" EndFunc Func Button2_onclick($oEvtObj) $oIE.Quit() Exit EndFunc Or even better:expandcollapse popupGlobal $oIE = ObjCreate("InternetExplorer.Application") Local $oEventBrowser = ObjEvent($oIE, "Browser_", "DWebBrowserEvents2") Local $oEventLink1, $oEventButton2 ; to collect event objects to $oIE.navigate("about:blank") ;----------------------------------------------- While Sleep(100) WEnd ; THE END ;----------------------------------------------- Func Customize($oBrowser, ByRef $oEventLink1, ByRef $oEventButton2) Local $sHtml = '<body> <a id="idLink" href="#" title="Link" >Click me</a> <br><br> <button id="idButton" title="Button" >Click me</button> </body>' Local $oDoc = $oBrowser.document $oDoc.write($sHtml) $oBrowser.visible = True Local $oLink1 = $oDoc.getElementById("idLink") Local $oButton2 = $oDoc.getElementById("idButton") ; Event objects $oEventLink1 = ObjEvent($oLink1, "Link1_") $oEventButton2 = ObjEvent($oButton2, "Button2_") EndFunc ;Events for browser Func Browser_OnQuit() Exit EndFunc Func Browser_DocumentComplete($oDisp, $sUrl) Customize($oDisp, $oEventLink1, $oEventButton2) EndFunc ; Events for link Func Link1_onclick($oEvtObj) $oIE.document.getElementById("idLink").innerhtml = "You clicked me" EndFunc Func Link1_onmouseover($oEvtObj) $oIE.document.getElementById("idLink").innerhtml = "Hovering" EndFunc Func Link1_onmouseout($oEvtObj) $oIE.document.getElementById("idLink").innerhtml = "Not Hovering" EndFunc ; Events for button Func Button2_onmouseover($oEvtObj) $oIE.document.getElementById("idButton").innerhtml = "Hovering Button (click to Exit)" EndFunc Func Button2_onmouseout($oEvtObj) $oIE.document.getElementById("idButton").innerhtml = "Not Hovering Button (click to Exit)" EndFunc Func Button2_onclick($oEvtObj) $oIE.Quit() Exit EndFunc @Trancexx Thank you, but it seems like we still don't understand each other. Look here, this is the part of my code before I started this thread: Global $oIEEvents = ObjEvent(_IEGetObjById($oIE, "btn1"), "_MyBTN1_", "HTMLAnchorEvents2") Global $oIEEvents = ObjEvent(_IEGetObjById($oIE, "btn2"), "_MyBTN2_", "HTMLAnchorEvents2") Global $oIEEvents = ObjEvent(_IEGetObjById($oIE, "btn3"), "_MyBTN3_", "HTMLAnchorEvents2") Global $oIEEvents = ObjEvent(_IEGetObjById($oIE, "btn4"), "_MyBTN4_", "HTMLAnchorEvents2") Global $oIEEvents = ObjEvent(_IEGetObjById($oIE, "btn5"), "_MyBTN5_", "HTMLAnchorEvents2") Global $oIEEvents = ObjEvent(_IEGetObjById($oIE, "btn6"), "_MyBTN6_", "HTMLAnchorEvents2") Global $oIEEvents = ObjEvent(_IEGetObjById($oIE, "btn7"), "_MyBTN7_", "HTMLAnchorEvents2") Global $oIEEvents = ObjEvent(_IEGetObjById($oIE, "btn8"), "_MyBTN8_", "HTMLAnchorEvents2") Global $oIEEvents = ObjEvent(_IEGetObjById($oIE, "btn9"), "_MyBTN9_", "HTMLAnchorEvents2") Func _MyBTN1_onclick() W("btn1") EndFunc ;==>_MyLink_onclick Func _MyBTN2_onclick() W("btn2") EndFunc ;==>_MyLink_onclick and so on for every button And it works, that's not the problem. Now, my goal is to avoid making a function for EVERY button. In other words, How to receive Clicked Element ID directly on W() function. In simple words, How can I get an ID for a clicked element without pre knowing its id (like in your example). Thank you for your time and effort. Edited January 16, 2014 by milos83 Link to comment Share on other sites More sharing options...
trancexx Posted January 16, 2014 Share Posted January 16, 2014 You can't. I thought I was kind of clear on that. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
milos83 Posted January 16, 2014 Author Share Posted January 16, 2014 You can't. I thought I was kind of clear on that. Too bad. Aj živa bila Thanks everyone Link to comment Share on other sites More sharing options...
Solution trancexx Posted January 16, 2014 Solution Share Posted January 16, 2014 (edited) Meh, I forgot that you can make event functions execute synchronously. LOL and I wrote the code for that. Yes, you can get id or object that fired the event from within event function: expandcollapse popupGlobal $oIE = ObjCreate("InternetExplorer.Application") Local $oEventBrowser = ObjEvent($oIE, "Browser_", "DWebBrowserEvents2") Local $oEventLink1, $oEventButton2 ; to collect event objects to $oIE.navigate("about:blank") ;----------------------------------------------- While Sleep(100) WEnd ; THE END ;----------------------------------------------- Func Customize($oBrowser, ByRef $oEventLink1, ByRef $oEventButton2) Local $sHtml = '<body> <a id="idLink" href="#" title="Link" >Click me</a> <br><br> <button id="idButton" title="Button" >Click me</button> </body>' Local $oDoc = $oBrowser.document $oDoc.write($sHtml) $oBrowser.visible = True Local $oLink1 = $oDoc.getElementById("idLink") Local $oButton2 = $oDoc.getElementById("idButton") ; Event objects $oEventLink1 = ObjEvent($oLink1, "Event_", "HTMLAnchorEvents2") $oEventButton2 = ObjEvent($oButton2, "Event_", "HTMLButtonElementEvents2") EndFunc ;Events for browser Func Browser_OnQuit() Exit EndFunc Func Browser_DocumentComplete($oDisp, $sUrl) Customize($oDisp, $oEventLink1, $oEventButton2) EndFunc ; Events volatile Func Event_onmouseover($oEvtObj) If IsObj($oEvtObj) Then ConsoleWrite("id = " & $oEvtObj.srcElement.id & " fired onmouseover" & @CRLF) Switch $oEvtObj.srcElement Case $oIE.document.getElementById("idLink") $oEvtObj.srcElement.innerhtml = "Hovering Anchor" Case $oIE.document.getElementById("idButton") $oEvtObj.srcElement.innerhtml = "Hovering Button (click to Exit)" EndSwitch EndIf EndFunc volatile Func Event_onmouseout($oEvtObj) If IsObj($oEvtObj) Then ConsoleWrite("id = " & $oEvtObj.srcElement.id & " fired onmouseout" & @CRLF) Switch $oEvtObj.srcElement ; check Case $oIE.document.getElementById("idLink") $oEvtObj.srcElement.innerhtml = "Not Hovering Anchor" Case $oIE.document.getElementById("idButton") $oEvtObj.srcElement.innerhtml = "Not Hovering Button (click to Exit)" EndSwitch EndIf EndFunc volatile Func Event_onclick($oEvtObj) If IsObj($oEvtObj) Then ConsoleWrite("id = " & $oEvtObj.srcElement.id & " fired onclick" & @CRLF) If $oEvtObj.srcElement = $oIE.document.getElementById("idButton") Then $oIE.Quit() Exit EndIf EndIf EndFunc Then It has to be HTMLAnchorEvents2, HTMLButtonElementEvents2, etc... You can compare id-s or objects directly to get the one that fired (i'm checking objects in that example). Edited January 16, 2014 by trancexx mLipok, Gianni, JohnOne and 1 other 4 ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
milos83 Posted January 16, 2014 Author Share Posted January 16, 2014 Meh, I forgot that you can make event functions execute synchronously. LOL and I wrote the code for that. Yes, you can get id or object that fired the event from within event function: expandcollapse popupGlobal $oIE = ObjCreate("InternetExplorer.Application") Local $oEventBrowser = ObjEvent($oIE, "Browser_", "DWebBrowserEvents2") Local $oEventLink1, $oEventButton2 ; to collect event objects to $oIE.navigate("about:blank") ;----------------------------------------------- While Sleep(100) WEnd ; THE END ;----------------------------------------------- Func Customize($oBrowser, ByRef $oEventLink1, ByRef $oEventButton2) Local $sHtml = '<body> <a id="idLink" href="#" title="Link" >Click me</a> <br><br> <button id="idButton" title="Button" >Click me</button> </body>' Local $oDoc = $oBrowser.document $oDoc.write($sHtml) $oBrowser.visible = True Local $oLink1 = $oDoc.getElementById("idLink") Local $oButton2 = $oDoc.getElementById("idButton") ; Event objects $oEventLink1 = ObjEvent($oLink1, "Event_", "HTMLAnchorEvents2") $oEventButton2 = ObjEvent($oButton2, "Event_", "HTMLButtonElementEvents2") EndFunc ;Events for browser Func Browser_OnQuit() Exit EndFunc Func Browser_DocumentComplete($oDisp, $sUrl) Customize($oDisp, $oEventLink1, $oEventButton2) EndFunc ; Events volatile Func Event_onmouseover($oEvtObj) If IsObj($oEvtObj) Then ConsoleWrite("id = " & $oEvtObj.srcElement.id & " fired onmouseover" & @CRLF) Switch $oEvtObj.srcElement Case $oIE.document.getElementById("idLink") $oEvtObj.srcElement.innerhtml = "Hovering Anchor" Case $oIE.document.getElementById("idButton") $oEvtObj.srcElement.innerhtml = "Hovering Button (click to Exit)" EndSwitch EndIf EndFunc volatile Func Event_onmouseout($oEvtObj) If IsObj($oEvtObj) Then ConsoleWrite("id = " & $oEvtObj.srcElement.id & " fired onmouseout" & @CRLF) Switch $oEvtObj.srcElement ; check Case $oIE.document.getElementById("idLink") $oEvtObj.srcElement.innerhtml = "Not Hovering Anchor" Case $oIE.document.getElementById("idButton") $oEvtObj.srcElement.innerhtml = "Not Hovering Button (click to Exit)" EndSwitch EndIf EndFunc volatile Func Event_onclick($oEvtObj) If IsObj($oEvtObj) Then ConsoleWrite("id = " & $oEvtObj.srcElement.id & " fired onclick" & @CRLF) If $oEvtObj.srcElement = $oIE.document.getElementById("idButton") Then $oIE.Quit() Exit EndIf EndIf EndFunc Then It has to be HTMLAnchorEvents2, HTMLButtonElementEvents2, etc... You can compare id-s or objects directly to get the one that fired (i'm checking objects in that example). volatile ? Link to comment Share on other sites More sharing options...
bogQ Posted January 16, 2014 Share Posted January 16, 2014 (edited) newer seen that one but... http://www.autoitscript.com/autoit3/docs/keywords/Volatile.htm Edited January 16, 2014 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
milos83 Posted January 16, 2014 Author Share Posted January 16, 2014 (edited) newer seen that one but... http://www.autoitscript.com/autoit3/docs/keywords/Volatile.htm Latest beta probably. Actually I'm two versions behind (3.3.8.1)... Pozdrav Edited January 16, 2014 by milos83 Link to comment Share on other sites More sharing options...
trancexx Posted January 16, 2014 Share Posted January 16, 2014 Nije beta, šta se treseš. 3.3.10. naovamo, i još godinu prije kroz bete. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now