Jump to content

auto select radio buttons


Recommended Posts

but you aren't refreshing your object.  It's not magically going to reinstate on the (?)new page(?):

$oButton = _IEGetObjByName($oIE, "action:FindClins")
$oButton.Focus()
$oButton.Click()
Sleep (5000)
_IELoadWait($oIE)
$oLinks = _IELinkGetCollection($oIE)
Local $bFound = False
For $oLink In $oLinks
    If StringInStr($oLink.innertext, "Delimited") Then
        $bFound = True
        $oLink.Focus()
        $oLink.Click()
        Exitloop
    EndIf
Next

If $bFound Then
    ConsoleWrite("found the link" & @CRLF)
Else
    ConsoleWrite("did not find the link" & @CRLF)
EndIf

Unless you were pulling directly from the DOM:

$oButton = _IEGetObjByName($oIE, "action:FindClins")
$oButton.Focus()
$oButton.Click()
Sleep (5000)
_IELoadWait($oIE)
Local $bFound = False
For $oLink In $oIE.document.links
    If StringInStr($oLink.innertext, "Delimited") Then
        $bFound = True
        $oLink.Focus()
        $oLink.Click()
        Exitloop
    EndIf
Next
Edited by jdelaney
IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Link to comment
Share on other sites

Woooah!  It worked!  Thank you!  You guys are great!  I really appreciate this.  Now i have a much better foundation and i can build on what i have learned today.  Thanks again.  Just so you know, here is what worked finally.  It's just what JD posted above:

$oButton = _IEGetObjByName($oIE, "action:FindClins")
$oButton.Focus()
$oButton.Click()
Sleep (5000)
_IELoadWait($oIE)
$oLinks = _IELinkGetCollection($oIE)
For $oLink In $oLinks
    If StringInStr($oLink.innertext, "Delimited") Then
        $oLink.Focus()
        $oLink.Click()
        Exitloop
    EndIf
Next

thanks,

Jev

Link to comment
Share on other sites

Hem, the _IELoadWait finally does it... didn't you try it as I suggested before ?  :)

So you can fire the Sleep(5000)

Glad we could help  ;)

Edit

Ohhh I seee.... it was the "$oLinks = _IELinkGetCollection($oIE)" missing  :D



Edited by mikell
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...