prismite Posted February 27, 2015 Posted February 27, 2015 Hi All. I'm trying to configure a script that has multiple options, one of which is chosen by clicking a Radio button. It seems tricky to get this done because the typical radio button has to be 'read' first, so I'm having trouble locking down my terminology... While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 AND $Radio11 Above is obviously wrong, but it should convey what I'm trying to do. I've tried this, too: While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 AND BitAND(GUICtrlRead($Radio11), $GUI_Checked) The end result in both is that it continually executes this case, despite no button/radio selected. Ideas?
Solution JohnOne Posted February 27, 2015 Solution Posted February 27, 2015 While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 If BitAND(GUICtrlRead($Radio11), $GUI_Checked) Then ;stuff Else ;different stuff EndIf AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
UEZ Posted February 27, 2015 Posted February 27, 2015 (edited) Replace AND with a comma (,) and try again (1st code) In the 2nd code Case $Button1 AND BitAND(GUICtrlRead($Radio11), $GUI_Checked) makes no sense! Check out J1's example! Br, UEZ Edited February 27, 2015 by UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
prismite Posted February 27, 2015 Author Posted February 27, 2015 While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 If BitAND(GUICtrlRead($Radio11), $GUI_Checked) Then ;stuff Else ;different stuff EndIf OMG. So simple that I missed it. You, sir, are a wizard of a man. Thanks to J1 and Uez!
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