xah Posted January 8, 2009 Posted January 8, 2009 (edited) The script freezes when using _IELinkClickByIndex() wich opens a popup Windows. #include-once #include <IE.au3> #include <Excel.au3> #include <_toolFunctions.au3> objectMaken() $oFormContent = _IEFormGetObjByName($oFrameContent, 0) $productID = _ExcelReadCell ($oExcel, $Ri, 7) $linkIndex = kiesProduct($productID) _IELinkClickByIndex ($oFrameContent, $linkIndex, 0);Opens a popup and does not continue MsgBox (64, "Info", "Hallo!") Func kiesProduct($productID) $prodLink = "https://www.epacity.nl/site/ProcessRegradeServlet?epacityProductId=" & $productID $oLinks = _IELinkGetCollection ($oFrameContent) $iNumLinks = @extended For $i = 0 to ($iNumLinks -1) $oLink = _IELinkGetCollection ($oFrameContent, $i) If $oLink.href = $prodLink Then ;_IELinkClickByIndex ($oFrameContent, $i, 0) Return $i EndIf Next Return False EndFunc Please help? Edited January 8, 2009 by xah
PsaltyDS Posted January 8, 2009 Posted January 8, 2009 The script freezes when using _IELinkClickByIndex() wich opens a popup Windows.Please help?Are you saying the link clicked does produce a popup window, but the MsgBox() doesn't come up? Since you have $f_wait = 0, that should not be blocking. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
James Posted January 8, 2009 Posted January 8, 2009 Perhaps the script is loading. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
xah Posted January 8, 2009 Author Posted January 8, 2009 Are you saying the link clicked does produce a popup window, but the MsgBox() doesn't come up? Since you have $f_wait = 0, that should not be blocking. Exaclty! Why does it not continue ? Any ideas ?
PsaltyDS Posted January 8, 2009 Posted January 8, 2009 Exaclty! Why does it not continue ? Any ideas ? Try giving focus to the object and then ControlClick() on it: $hIE = _IEPropertyGet($oIE, "hwnd") $oLink = _IELinkGetCollection($oFrameContent, $linkIndex) _IEAction($oLink, "focus") ControlClick($hIE, "", "") Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
xah Posted January 9, 2009 Author Posted January 9, 2009 (edited) Try giving focus to the object and then ControlClick() on it: $hIE = _IEPropertyGet($oIE, "hwnd") $oLink = _IELinkGetCollection($oFrameContent, $linkIndex) _IEAction($oLink, "focus") ControlClick($hIE, "", "") Thanks, it works now by giving focus to the object and then ControlSend(). Edited January 9, 2009 by xah
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