Jump to content

noob-o-saur (Radio Button)


kenzee
 Share

Recommended Posts

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 by kenzee
Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...