Jump to content
Sign in to follow this  

_IEAction Click

Recommended Posts


I quickly threw this together to change my IP and it doesn't seem to work it Clicks the Release Button ok, but it does not click the renew i think it is clicking the release button again and not the renew.

#include <IE.au3>
$IE = _IECreate("",0,1,0)
While Not WinExists("Connect to")

    ControlSetText("Connect to",'',1003,"admin")
    ControlSetText("Connect to",'',1005,"admin")
    ControlClick("Connect to",'',1)
    $HTML =_IEDocReadHTML($IE)
    $string = StringRegExp($HTML,'<TD><FONT style="FONT-SIZE: 8pt"><B>(\d+\.\d+\.\d+\.\d+)',3)
    $IP = $string[0]
    $CurrentIP = $string[0]
    While $IP = $CurrentIP
        $Status_Form = _IEFormGetObjByName($IE,"status")
        $release = _IEFormElementGetObjByName($Status_Form,"dhcp_release")
        $Status_Form = _IEFormGetObjByName($IE,"status")
        $renew = _IEFormElementGetObjByName($Status_Form,"dhcp_renew")
        $string = StringRegExp(_IEDocReadHTML($IE),'<TD><FONT style="FONT-SIZE: 8pt"><B>(\d+\.\d+\.\d+\.\d+)',3)
        $CurrentIP = $string[0]
Edited by Thatsgreat2345

Share this post

Link to post
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
Sign in to follow this