Sign in to follow this  
Followers 0
erikson

gui help

2 posts in this topic

hello codemasters!!

CODE
$number_of_keys = _FileCountLines ("c:\windows\system\checkbouk.dat")

$title = ""

$Choices = $number_of_keys

$Counter = 0

Dim $Radio[45]

$GUI = GUICreate(" Radio Button Selector", 400, ($Choices * 15 ) + 65, 50, 100, "", $WS_EX_TOOLWINDOW)

GUISetOnEvent($GUI_EVENT_CLOSE, "Done")

GUICtrlCreateLabel("Alege cheia pulii mele", 100, 10)

MakeChoices()

GUISetState(@SW_SHOW)

List1()

Func List1()

While 1

$msg = GUIGetMsg()

Select

Case $msg = $GUI_EVENT_CLOSE

Done()

EndSelect

Wend

EndFunc

Func MakeChoices()

For $Counter = 0 To $Choices

$Radio[$Counter] = GUICtrlCreateRadio($title & $Counter & " ", 10, ($Counter * 20) + 10)

GUICtrlSetOnEvent(-1, "getkey")

Next

EndFunc

i have this script. i makes a gui window with dynamyc radio buttons

how i make, that after i select a radio button , gui windowd to dissapear?

Share this post


Link to post
Share on other sites



I found it a little hard to work with your script so I made a very small GUI with 2 radio buttons... when you click the first one the GUI exits, the second one the GUI hides.

#region --- GuiBuilder code Start ---
; Script generated by AutoBuilder 0.6 Prototype

#include <GuiConstants.au3>

GuiCreate("MyGUI", 392, 316,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))

$Radio_1 = GuiCtrlCreateRadio("Radio1", 70, 50, 60, 30)
$Radio_2 = GuiCtrlCreateRadio("Radio2", 70, 120, 60, 40)

GuiSetState()
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case $msg = $Radio_1
        ExitLoop
    Case $msg = $Radio_2
        GUISetState(@SW_HIDE)
    Case Else
        ;;;
    EndSelect
WEnd
Exit
#endregion --- GuiBuilder generated code End ---

If I have more time I'll try to go back to your script and make the changes, but hopefully this helps


While ProcessExists('Andrews bad day.exe')
	BlockInput(1)
	SoundPlay('Music.wav')
	SoundSetWaveVolume('Louder')
WEnd

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  
Followers 0