Jump to content
Sign in to follow this  

Compairing List items

Recommended Posts


I have my script changing the IP. I want it to be able to know if it has used this IP previously, and change it again if the IP has been used before.

My thoughts were to add them to a GUICtrlCreateList and then compare them some how. I did some searching and found a script () that stores the list items in a array.

I updated it so I no longer get syntax errors and now have this

Func IP()
    $PublicIP = _GetIP()
    GUICtrlSetData($IPList, $PublicIP)
    Dim $IP_list
            For $x = 0 To _GUICtrlListBox_GetCount ($IPList) - 1
                If Not IsArray($IP_list) Then
                    Dim $IP_list[1]
                    ReDim $IP_list[UBound($IP_list) + 1]
                $IP_list[UBound($IP_list) - 1] = _GUICtrlListBox_GetText ($IPList, $x)
            For $x = 0 To UBound($IP_list) - 1
                MsgBox(0, $x, $IP_list[$x])

But I still have no idea how to go about searching the array values against the $PublicIP value that will be the current IP.

Any help?

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.