Ryukk0 Posted October 2, 2011 Posted October 2, 2011 i need help in checkbox's and radios... i put an example in the end i have that GUI with 2 Radios each 1 do a diferent thing 1spams a "I" the other a "W". but i can only make them send 1 of each how do i make them send untin radio isnt checked???? PS: sorry for bad english TY in advance.. #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 164, 34, 192, 124) $Radio1 = GUICtrlCreateRadio("SpamI", 8, 8, 49, 17) $Radio2 = GUICtrlCreateRadio("SpamX", 96, 8, 57, 17) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Radio1 send("i") Case $Radio2 Send("x") EndSwitch WEnd
MrVietA2 Posted October 2, 2011 Posted October 2, 2011 Ryukk0,Try this :If guictrlread($Radio1) = 4 Then Send("i") EndIf If GUICtrlRead($Radio2) = 4 Then Send("i") Endif
sleepydvdr Posted October 2, 2011 Posted October 2, 2011 Is this what you want? I added in a button to uncheck the radios. expandcollapse popup#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Include <GuiButton.au3> $message = 0 $Form1 = GUICreate("Form1", 164, 34, 192, 124) $Radio1 = GUICtrlCreateRadio("SpamI", 8, 8, 49, 17) $Radio2 = GUICtrlCreateRadio("SpamX", 96, 8, 57, 17) $Button1 = GUICtrlCreateButton("", 62, 8, 27, 17) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Radio1 _i() Case $Radio2 _x() Case $Button1 $test = GUICtrlRead($Button1) GUICtrlSetState($Radio1, $GUI_UNCHECKED) GUICtrlSetState($Radio2, $GUI_UNCHECKED) EndSwitch WEnd Func _i() Do Send("i") Sleep(100) Until GUICtrlRead($Radio1) = 4 OR _GUICtrlButton_GetState($Button1) = $BST_FOCUS EndFunc ;==>_i Func _x() Do Send("x") Sleep(100) Until GUICtrlRead($Radio2) = 4 OR _GUICtrlButton_GetState($Button1) = $BST_FOCUS EndFunc ;==>_x #include <ByteMe.au3>
Ryukk0 Posted October 2, 2011 Author Posted October 2, 2011 (edited) ya its that... tnkz alot... can i make a func for pixelsearch too??? Edited October 2, 2011 by Ryukk0
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