Jump to content

Stupid Question... List box with multiple entries.


Recommended Posts

ok, I've made an AutoIt script + GUI that checks my webserver for my external IP then pings my DNS once to see if my DNS IP = my External IP...

if the IPs match i want my script to pause for 5 minutes sleep(300000) *if thats possible lol*

then press the update button again..

now the problem...

the list box doesn't update add more text... like.. when i press update after its already been pressed. it just refreshes the data in there... example..

Update then pressed update again...

Getting External IP Please Wait...

*got IP... IP shows up here*

Comparing IP to *my dns here*

IP's match no change required

how i want it...

update then pressed update again...

Getting External IP Please Wait...

*got IP... IP shows up here*

Comparing IP to *my dns here*

IP's match no change required

--- Update ---

Getting External IP Please Wait...

*got IP... IP shows up here*

Comparing IP to *my dns here*

IP's match no change required

etc.. etc.. etc...

hope that made sence lol.

Link to post
Share on other sites

Case $msg = $Update
        GUICtrlSetData($Status,"Getting External IP Please Wait...")
        $PublicIP = _GetIP()
        GUICtrlSetData($Status,$PublicIP)
        sleep(500)
        GUICtrlSetData($Status,"Comparing IP to *my DNS hostname*")
        Run("dns.cmd","",@SW_HIDE)
        sleep(500)
        $DNS = _GetDNS()

            If $DNS = $PublicIP Then
                GUICtrlSetData($Status,"No Change Required")
            Else
                GUICtrlSetData($Status,"IP's Do Not Match")
                Run("c:\Program Files\Mozilla Firefox\firefox.exe 
                *URL to go to to update my DNS.. had username/password*
                WinWaitActive("Confirm")
                sleep(500)
                Send("{Enter}")
                sleep(500)
                WinClose("Mozilla Firefox")
            EndIf
    Case Else
   ;;;
    EndSelect

removed info like.. my username/password for my DNS and the name of my dns so no one can get my IP.

Edited by Bi0haZarD
Link to post
Share on other sites

ok i'm a scripting newb lol and didn't understand the GUICtrlSendMsg function... insted i decided to kill 2 birds with 1 stone....

GUICtrlSetData($Status, _NowTime() & " No Change Required")

since the time changes the values are diffrent. plus i can see when the IP changes and at what time =)

thx for all the help

Edited by Bi0haZarD
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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...