Vision Posted March 18, 2008 Share Posted March 18, 2008 HI, i need some help^^ i will perform a permanent check if $radiobutton1 or $radiobutton2 is checked, if radio button 1 is checked go the Func1 etc... i have actually this here, but it dont work... expandcollapse popupWhile $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Radio1 _radiobtnchecked1() Case $msg = $Radio2 _radiobtnchecked2() EndSelect Wend Func _radiobtnchecked1() $msg = GUIGetMsg() While 1 Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button1 _GetData1() Case $msg = $Button2 _GetData2() Case $msg = $Button3 _GetData3() EndSelect WEnd Endfunc Func _radiobtnchecked2() $msg = GUIGetMsg() While 1 Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button1 _MsgOut("p1") Case $msg = $Button2 _MsgOut("p2") Case $msg = $Button3 _MsgOut("p3") EndSelect Wend EndFunc can someone help me :/? if there any question pls ask me^^ Link to comment Share on other sites More sharing options...
rasim Posted March 18, 2008 Share Posted March 18, 2008 Look to AdlibEnable() in help file. Link to comment Share on other sites More sharing options...
Vision Posted March 20, 2008 Author Share Posted March 20, 2008 (edited) i cant get them work... i need something like this: if checkbox is unckecked do this1 if checkbox is checked do this2 and with AdlibEnable() i can check every 1 second if the checkbox is checked or unchecked exsamle: so if the checkbox is unchecked i will when i push the button1 that they do the func test1 and if the checkbox is checked and i push the button1 that they do the func test2 would be very nice Edited March 20, 2008 by Vision Link to comment Share on other sites More sharing options...
rasim Posted March 21, 2008 Share Posted March 21, 2008 Hi! This is not a hard: #include <GuiConstants.au3> $hGUI = GUICreate("Test GUI", 200, 100) $Checkbox = GUICtrlCreateCheckbox("Checkbox", 50, 20, 70, 16) $button = GUICtrlCreateButton("Button", 50, 70, 60, 25) GUISetState() While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE ExitLoop Case $button If GUICtrlRead($Checkbox) = $GUI_UNCHECKED Then _Test1() Else _Test2() EndIf EndSwitch WEnd Func _Test1() ConsoleWrite("_Test1" & @LF) EndFunc Func _Test2() ConsoleWrite("_Test2" & @LF) EndFunc Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now