hagaizenberg Posted September 11, 2009 Share Posted September 11, 2009 Hi,I've been using AutoIt with Internet Explorer to automate some stuff and I came across this problem:I have an link i wanna click that has both onmouseup and onclick, something like:<a href="#" .... onmouseup="func1();" onclick="func2();">Some Text</a>Problem is that when i use _IEAction with "click" it seems that it only perform the onclick function and not the onmouseup function.Am I doing something wrong? is there a way to simulate the mouseup?Here's the code, I've tried using other methods such as focus and so but with no luck):$oInputs = _IETagNameGetCollection ($oIE, "a") For $oInput In $oInputs If StringCompare($oInput.innerHtml,$value) == 0 Then traceLog("Found "&$value& " in innterHtml, now clicking it") ;_IEAction($oInput, "focus") _IEAction($oInput, "click") If @error > 0 Then traceLog("_IEAction Click on link with innerHtml "&$value&" failed with @error = "&@error ) _IELoadWait ($oIE) return False Else traceLog("_IEAction Click on link with innerHtml "&$value&" succesfull") _IELoadWait ($oIE) return True EndIf EndIf NextAny ideas?10x. Link to comment Share on other sites More sharing options...
Juvigy Posted September 11, 2009 Share Posted September 11, 2009 (edited) Try : $oInput.FireEvent("onclick") $oInput.FireEvent("onmouseup") Edited September 11, 2009 by Juvigy Link to comment Share on other sites More sharing options...
hagaizenberg Posted September 11, 2009 Author Share Posted September 11, 2009 You Rock!! This works perfectly!! Thanks. 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