Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Radio Button Issue

$
0
0
Hello Everyone -

I'm working with radio buttons and I'm attempting to get the state of the button to see which one has been pressed.  I have a small example script below.  I cannot seem to get it to report anything different from any of the radio buttons.  I have also tried using GuiCtrlRead () to no avail. Any help is appreciated!

[ autoit ]         
#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3>Opt("GUIOnEventMode", 1) $Form1 = GUICreate("Form1", 498, 242, 192, 124) GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close") $Radio1 = GUICtrlCreateRadio("Radio1", 104, 48, 113, 17) $Radio2 = GUICtrlCreateRadio("Radio2", 104, 96, 113, 17) $Radio3 = GUICtrlCreateRadio("Radio3", 104, 152, 113, 17) GUICtrlCreateButton ("click me", 50, 10) GUICtrlSetOnEvent(-1, "ClickMe") GUISetState(@SW_SHOW) While 1      Sleep(100) WEnd Func Form1Close()      Exit EndFunc Func ClickMe ()      $State1 = GUICtrlGetState ($Radio1)      $State2 = GUICtrlGetState ($Radio2)      $State3 = GUICtrlGetState ($Radio3)      ConsoleWrite($State1 & " " & $State2 & " " & $State3 & @LF) EndFunc

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>