Jump to content

Newbie - Nothing happens when click in OK button.


Guest MigraineBoy
 Share

Recommended Posts

Guest MigraineBoy

Hi, guys :ph34r: .

I´m trying to create a GUI to select what build I will proceed the installation.

But when I hit the OK button nothing happens :( .

Follow the code...

Global $GUI_SHOW = 16

Global $GUI_HIDE = 32

Global $GUI_CHECKED = 1

Opt ("GUINotifyMode", 1)

GUICreate("Select the Building:", 280, 490)

$client_radio_1 = GuiSetControl ("radio", "Building 1", 10,10,100,20)

$client_radio_2 = GuiSetControl ("radio", "Building 2", 10,30,100,20)

$client_radio_3 = GuiSetControl ("radio", "Building 3", 10,50,100,20)

$client_radio_4 = GuiSetControl ("radio", "Building 4", 10,70,100,20)

$client_radio_5 = GuiSetControl ("radio", "Building 5", 10,90,100,20)

$client_radio_6 = GuiSetControl ("radio", "Building 6", 10,110,100,20)

$client_radio_7 = GuiSetControl ("radio", "Building 7", 10,130,100,20)

$client_radio_8 = GuiSetControl ("radio", "Building 8", 10,150,100,20)

$client_radio_9 = GuiSetControl ("radio", "Building 9", 10,170,100,20)

$client_radio_10 = GuiSetControl ("radio", "Building 10", 10,190,100,20)

$client_radio_11 = GuiSetControl ("radio", "Building 11", 10,210,100,20)

$client_radio_12 = GuiSetControl ("radio", "Building 12", 10,230,100,20)

$client_radio_13 = GuiSetControl ("radio", "Building 13", 10,250,100,20)

$client_radio_14 = GuiSetControl ("radio", "Building 14", 10,270,100,20)

$client_radio_15 = GuiSetControl ("radio", "Building 15", 10,290,100,20)

$client_radio_16 = GuiSetControl ("radio", "Building 16", 10,310,100,20)

$client_radio_17 = GuiSetControl ("radio", "Building 17", 10,330,100,20)

$client_radio_18 = GuiSetControl ("radio", "Building 18", 10,350,100,20)

$OK = GUISetControl ("button", "OK", 10,420,100,20)

$Cancel = GuisetControl ("button", "Cancel", 150,420,100,20)

GuiShow()

While 1

$MSG = GUIMsg()

Select

Case $MSG = -3

Exit

Case GuiRead() = $CANCEL

Exit

Case GUIRead() = $OK

If GUIRead($client_radio_1) = $GUI_CHECKED Then $CLient = "Building 1"

If GUIRead($client_radio_2) = $GUI_CHECKED Then $CLient = "Building 2"

If GUIRead($client_radio_3) = $GUI_CHECKED Then $CLient = "Building 3"

If GUIRead($client_radio_4) = $GUI_CHECKED Then $CLient = "Building 4"

If GUIRead($client_radio_5) = $GUI_CHECKED Then $CLient = "Building 5"

If GUIRead($client_radio_6) = $GUI_CHECKED Then $CLient = "Building 6"

If GUIRead($client_radio_7) = $GUI_CHECKED Then $CLient = "Building 7"

If GUIRead($client_radio_8) = $GUI_CHECKED Then $CLient = "Building 8"

If GUIRead($client_radio_9) = $GUI_CHECKED Then $CLient = "Building 9"

If GUIRead($client_radio_10) = $GUI_CHECKED Then $CLient = "Building 10"

If GUIRead($client_radio_11) = $GUI_CHECKED Then $CLient = "Building 11"

If GUIRead($client_radio_12) = $GUI_CHECKED Then $CLient = "Building 12"

If GUIRead($client_radio_13) = $GUI_CHECKED Then $CLient = "Building 13"

If GUIRead($client_radio_14) = $GUI_CHECKED Then $CLient = "Building 14"

If GUIRead($client_radio_15) = $GUI_CHECKED Then $CLient = "Building 15"

If GUIRead($client_radio_16) = $GUI_CHECKED Then $CLient = "Building 16"

If GUIRead($client_radio_17) = $GUI_CHECKED Then $CLient = "Building 17"

If GUIRead($client_radio_18) = $GUI_CHECKED Then $CLient = "Building 18"

EndSelect

Wend

MsgBox(0,"teste", $client)

Link to comment
Share on other sites

Opt ("GUINotifyMode", 1)
GUICreate("Select the Building:", 280, 490)

$client_radio_1 = GuiSetControl ("radio", "Building 1", 10,10,100,20)

$OK = GUISetControl ("button", "OK", 10,420,100,20)
$Exit = GuisetControl ("button", "Exit", 150,420,100,20)

While 1
$N=GuiMsg ()

IF Guiread($client_radio_1) = 1 Then $client="test"

SELECT 
Case $n = $OK
ExitLoop

Case $n = $Exit
   Exit
 EndSelect
WEnd
GUIHide()  
Msgbox(0,0,$client)

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...