Jump to content

Check if selected.


Jammer
 Share

Recommended Posts

Ok first the code:

Case $msg = $run
        If GUICtrlRead($list_1) = "" Then 
                MsgBox(64, "You have 10 seconds", "Select a server or die! In 10 seconds!")
                sleep(10000)
        EndIf
        $z = 0
        Do 
            $z = $z + 1
        Until GUICtrlRead($list_1) = IniRead("server.ini", "SN", "key" & $z, "")
        $conip = IniRead("server.ini", "SIP", "key" & $z, "")
                $ofile = FileOpen("realmlist.wtf", 2)
                FileWrite($ofile, "set realmlist " & $conip)
                FileClose($ofile)    
    ;Run with options  
        $comline = ""  
        if GUICtrlRead ($c1) = 1 Then $comline = $comline & " -windowed"   
        if GUICtrlRead ($c2) = 1 Then $comline = $comline & " -opengl" 
        if GUICtrlRead ($c3) = 1 Then $comline = $comline & " -nosound"
        MsgBox(64, "Stats", $comline)

So as you can see in the second line it checks if anything is selected in the list and I don't know how to make it do nonething if nonething is selected in the list and do the code that is below if there is something selected in the select list.....As you can see I made currently a timer... If nonething is selected he has 10 seconds :lmao:)).

So if nonething is selected that it would do nonething and just pop up a msgbox(64, "Error", "Please select a server")

Link to comment
Share on other sites

Case $msg = $run
        MsgBox(64, "You have 10 seconds", "Select a server or die! In 10 seconds!")
        sleep(10000)
        If GUICtrlRead($list_1) = "" Then
            msgbox(64, "Error", "Please select a server")
            ContinueLoop
        EndIf
        $z = 0
        Do
            $z = $z + 1
        Until GUICtrlRead($list_1) = IniRead("server.ini", "SN", "key" & $z, "")
        $conip = IniRead("server.ini", "SIP", "key" & $z, "")
                $ofile = FileOpen("realmlist.wtf", 2)
                FileWrite($ofile, "set realmlist " & $conip)
                FileClose($ofile)   
  ;Run with options  
        $comline = ""  
        if GUICtrlRead ($c1) = 1 Then $comline = $comline & " -windowed"  
        if GUICtrlRead ($c2) = 1 Then $comline = $comline & " -opengl"
        if GUICtrlRead ($c3) = 1 Then $comline = $comline & " -nosound"
        MsgBox(64, "Stats", $comline)

Edited by SlimShady
Link to comment
Share on other sites

But it will keep the msg poping... i need it to pop once and then the user has to select a server and press $run again.... if the server is not selected it should popup again... and the user will have to select server and press run... again... and so and so and so...

And the sleep and Select a server or die is not needed :lmao:...

i Edited so.. :

Case $msg = $run
        While GUICtrlRead($list_1) = ""
            MsgBox(64, "Error", "Please select a server")
        WEnd
        $z = 0
        Do 
            $z = $z + 1................................................

but it keeps the window popin... i need it to pop once and then user has to select a server and press run again.. as I sayd before.... if he presses run and the server is not selected... it has to pop up once again and then the user has to select a server and press run again...

i hope u understand my messed mind...

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