kenzee Posted August 25, 2008 Share Posted August 25, 2008 (edited) Well i tried to follow the demonstrations/example scripts but I can't seem to get one even to modify the other... Ok so here we go... I have this group of radio buttons: $Issue = GUICtrlCreateGroup("Issue", 8, 120, 329, 81) $pw = GUICtrlCreateRadio("PW reset", 46, 152, 65, 17) GUICtrlSetOnEvent(-1, "pwClick") $un = GUICtrlCreateRadio("Forgot UN", 126, 152, 73, 17) GUICtrlSetOnEvent(-1, "unClick") $rg = GUICtrlCreateRadio("Registration", 214, 152, 81, 17) GUICtrlSetOnEvent(-1, "rgClick") $wn = GUICtrlCreateRadio("Wrong No.", 46, 176, 73, 17) GUICtrlSetOnEvent(-1, "wnClick") $al = GUICtrlCreateRadio("Auto-Logoff", 126, 176, 81, 17) GUICtrlSetOnEvent(-1, "alClick") $oe = GUICtrlCreateRadio("Other Error", 214, 176, 89, 17) GUICtrlSetOnEvent(-1, "oeClick") depending on which is selected i'd like to insert a line of text into here: Func reClick() ControlSend("ServiceCenter Enterprise Client - New Interaction - ServiceCenter Enterprise Client", "" , "[CLASS:Edit; INSTANCE:28]", "4 - Low") ControlSend("ServiceCenter Enterprise Client - New Interaction - ServiceCenter Enterprise Client", "" , "[CLASS:Edit; INSTANCE:30]", "INCOMING CALL") ControlCommand("ServiceCenter Enterprise Client - New Interaction - ServiceCenter Enterprise Client", "" , "[CLASS:SWT_Window0; INSTANCE:77]" , "TabRight", "") sleep(1000) ControlSend("ServiceCenter Enterprise Client - New Interaction - ServiceCenter Enterprise Client", "" , "[CLASS:Edit; INSTANCE:52]", "Advice & Guidance") ControlSend("ServiceCenter Enterprise Client - New Interaction - ServiceCenter Enterprise Client", "" , "[CLASS:SWT_Window0; INSTANCE:185]", "Resolution:") sleep(500) ControlCommand("ServiceCenter Enterprise Client - New Interaction - ServiceCenter Enterprise Client", "" , "[CLASS:SWT_Window0; INSTANCE:77]" , "TabLeft", "") sleep(500) ControlSend("ServiceCenter Enterprise Client - New Interaction - ServiceCenter Enterprise Client", "" , "[CLASS:SWT_Window0; INSTANCE:169]" , "caller name- {space}") sleep(200) ControlSend("ServiceCenter Enterprise Client - New Interaction - ServiceCenter Enterprise Client", "" , "[CLASS:SWT_Window0; INSTANCE:169]" , GuiCtrlRead($name)) sleep(200) ControlSend("ServiceCenter Enterprise Client - New Interaction - ServiceCenter Enterprise Client", "" , "[CLASS:SWT_Window0; INSTANCE:169]" , "{enter}location- ") sleep(200) ControlSend("ServiceCenter Enterprise Client - New Interaction - ServiceCenter Enterprise Client", "" , "[CLASS:SWT_Window0; INSTANCE:169]" , GuiCtrlRead($st)) Sleep(200) ControlSend("ServiceCenter Enterprise Client - New Interaction - ServiceCenter Enterprise Client", "" , "[CLASS:SWT_Window0; INSTANCE:169]" , "{enter}issue- ") sleep(200) >>>>>>>>>>>>>>>>>>>>>> HERE!!! <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Sleep(200) ControlSend("ServiceCenter Enterprise Client - New Interaction - ServiceCenter Enterprise Client", "" , "[CLASS:SWT_Window0; INSTANCE:169]" , "{enter} issue details- {enter} specific error message- {enter}Constituent Type:") Exit EndFunc I think i would poll the $Issue with the GuiCtrlRead command... is that right? and how would i set the $Issue to be the data i need it to be? Edited August 25, 2008 by kenzee Link to comment Share on other sites More sharing options...
Nahuel Posted August 25, 2008 Share Posted August 25, 2008 You mean how to know if the radiobutton is checked or not? If GuiCtrlRead($radio)=$GUI_CHECKED then _DoStuff() Link to comment Share on other sites More sharing options...
youknowwho4eva Posted August 26, 2008 Share Posted August 26, 2008 I would have an OK button so that when you click OK it reads the buttons to see which one is selected, then as Nahuel said us an if. But I would make it so the OK button did all the checking and use the results of that. Giggity Link to comment Share on other sites More sharing options...
Eigensheep Posted August 27, 2008 Share Posted August 27, 2008 I think the issue is that you don't need to check the $Issue as this is a group. As youknowwho4eva sort of said, I think (and I'm sure someone will tell me i'm wrong) that you need to check each radio button in turn using an If/ElseIf.. statement similar to Nahuel. Then to set them to the value you want, I personally would set all of them to $GUI_UNCHECKED and then set the one you want to $GUI_CHECKED. So... If BitAnd(GUICtrlRead($pw),$GUI_CHECKED) Then _DoStuff1() ElseIf BitAnd(GUICtrlRead($un),$GUI_CHECKED) Then _DoStuff2() ;etc...etc... EndIf Link to comment Share on other sites More sharing options...
youknowwho4eva Posted August 27, 2008 Share Posted August 27, 2008 Thats basically what I was saying, except I'd have If $msg = $okbutton then case Guictrlread($checkbox1) = $gui_checked dostuff and so on, and just to be safe have else msgbox(0,"None Selected", "Please select one before continuing") Giggity 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