Tagor Posted April 16, 2005 Share Posted April 16, 2005 Is it possible to run something if a radiobutton is being selected? Link to comment Share on other sites More sharing options...
TuMbLeWeEd Posted April 16, 2005 Share Posted April 16, 2005 Is it possible to run something if a radiobutton is being selected?<{POST_SNAPBACK}>Sure, why not! Just dig tru the helpfile, and look at the example codes (works for me) My AutoIt stuffChatBichProjectSelectorWindow control grabberUsefull LinksPort forwarding with routers Link to comment Share on other sites More sharing options...
Tagor Posted April 16, 2005 Author Share Posted April 16, 2005 That's not what I was looking for. I would like to run something when the bullet is clicked. Link to comment Share on other sites More sharing options...
eJan Posted April 16, 2005 Share Posted April 16, 2005 Run Notepad when 2nd radio clicked:#include <GuiConstants.au3>GuiCreate("", 100, 60)$radio0 = GuiCtrlCreateRadio("None", 0, 0, 100) $radio1 = GuiCtrlCreateRadio("Run Notepad", 0, 20, 100)GuiSetState()While 1 $msg = GuiGetMsg() Select case $msg = $radio1 Run("Notepad") Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelectWEnd Link to comment Share on other sites More sharing options...
Tagor Posted April 16, 2005 Author Share Posted April 16, 2005 Weird, then I don't get why this doesn't work: Instead of Run("Notepad"): GuiSetState ($radio0, $WS_ENABLE) Link to comment Share on other sites More sharing options...
TuMbLeWeEd Posted April 16, 2005 Share Posted April 16, 2005 (edited) Weird, then I don't get why this doesn't work:Instead of Run("Notepad"):GuiSetState ($radio0, $WS_ENABLE)<{POST_SNAPBACK}>Why you want to do that ? The control IS enabled!And it should be GuiCtrlSetState ($radio0, $GUI_ENABLE)Maybe if you explain wat you want to do we can help you! Edited April 16, 2005 by TuMbLeWeEd My AutoIt stuffChatBichProjectSelectorWindow control grabberUsefull LinksPort forwarding with routers Link to comment Share on other sites More sharing options...
eJan Posted April 16, 2005 Share Posted April 16, 2005 Then try: GuiCtrlSetState($radio0, $GUI_ENABLE) or GuiCtrlSetState($radio0, $GUI_CHECKED) (to work on it...). Link to comment Share on other sites More sharing options...
Tagor Posted April 16, 2005 Author Share Posted April 16, 2005 Sorry for not being clear. I want to make the following thing; all radiobuttons are enabled, if someone selects one of the radiobuttons, a submit button should become enabled to submit the values of the radiobuttons. Link to comment Share on other sites More sharing options...
steveR Posted April 17, 2005 Share Posted April 17, 2005 That function is handled better by a checkbox AutoIt3 online docs Use it... Know it... Live it...MSDN libraryglobal Help and SupportWindows: Just another pane in the glass. Link to comment Share on other sites More sharing options...
JSThePatriot Posted April 17, 2005 Share Posted April 17, 2005 Sorry for not being clear. I want to make the following thing; all radiobuttons are enabled, if someone selects one of the radiobuttons, a submit button should become enabled to submit the values of the radiobuttons.<{POST_SNAPBACK}>This is very easy to do. I am trying to look for some old code that I had that will do this. Save me the time of having to rethink everything and type it again hehe.Give me a few and hopefully we will get this resolved.JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Link to comment Share on other sites More sharing options...
megahyperion Posted April 17, 2005 Share Posted April 17, 2005 #include <GUIConstants.au3> GUICreate("My GUI radio") $radio1 = GUICtrlCreateRadio ("Radio 1", 10, 10, 120, 20) $exit = GUICtrlCreateButton ("exit", 10, 40, 120, 20) GUISetState () While 1 $msg = GUIGetMsg() If $msg = $exit Then exit endif If GUICtrlRead($radio1) = 1 Then MsgBox(4096, "Test", "tadaa") sleep(2000) Exit endif Wend I had to add the sleep(2000) and Exit in there so the box could actually be closed. Without it the msgbox couldnt be closed because the loop was still seeing the button checked. FYI radio button checked =1 Not checked =3 when using guiread 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