Jump to content
Sign in to follow this  
Bi0haZarD

Stupid Question... List box with multiple entries.

Recommended Posts

Bi0haZarD

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.

Share this post


Link to post
Share on other sites
Sokko

Could you post the code you have right now? Problems are a lot easier to spot if you can see exactly what's happening to cause them.

Share this post


Link to post
Share on other sites
Bi0haZarD

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

Share this post


Link to post
Share on other sites
Valuater

to add to the existing dats, maybe

GUICtrlSendMsg ( controlID, msg , wParam, lParam )

because GUICtrlSetData() replaces the data

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites
Bi0haZarD

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

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  

×