sakshi Posted May 14, 2010 Posted May 14, 2010 #include<GuiButton.au3>#include<GuiConstants.au3>GUICreate("Select Option",300,150,500,300)GuictrlCreateGroup("Select", 8, 18,140, 70)$radio = GUICtrlCreateRadio("Automatic",40,30,90,26)$radio = GUICtrlCreateRadio("Manual",40,60,90,26)$button1 = GUICtrlCreateButton("OK",45,95,80,30)GUISetState(@SW_SHOW)Global $selected;While 1 $msg = GUIGetMsg() Select; selects which case in going on Case $msg = $GUI_EVENT_CLOSE; if X is pressed it will close the window MsgBox(4096,"Exit","You choose to exit") ExitLoop Case $msg = $button1; if button 1 is pressed then this action will follow $RadioNumber = GuiCtrlRead($radio) Select case $radionumber = 0 $selected = "Automatic" ;it is not reaching here case $radionumber = 1 $selected = "Manual" ; but it is reaching here EndSelect msgbox(0, "Selected", "Your Selection is:" & $selected); EndSelectWEnd the control is reaching in the second radio but not the first onewhats the error in the code?please help.thanks.
BrettF Posted May 14, 2010 Posted May 14, 2010 Change $radio = GUICtrlCreateRadio("Automatic",40,30,90,26) $radio = GUICtrlCreateRadio("Manual",40,60,90,26) to $radio = GUICtrlCreateRadio("Automatic",40,30,90,26) MsgBox (0, "Value of Radio", $radio) $radio = GUICtrlCreateRadio("Manual",40,60,90,26) MsgBox (0, "Value of Radio", $radio) What do you observe? Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
l3ill Posted May 14, 2010 Posted May 14, 2010 so wat can be done ?to fish you must learn (yodas voice)This is a way to debug your script, and since BrettF chose this area perhaps...also you may want to look at the example under GUICtrlCreateRadio and see how this code differs from yours...good luck My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example
PsaltyDS Posted May 14, 2010 Posted May 14, 2010 (edited) to fish you must learn (yodas voice)Got a kick out of that:For a fish to have, to fish you must learn.All I need is a picture of Yoda on a swampy Dagobah bank, with a rod cane pole and a bobber in the water. Edited May 14, 2010 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
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