04-12-2013, 10:16 PM
Hello All,
I am working with a dialog that I have created where I am using a combo box to select from. Anyway, I have been searching the forums for how to return the selected item to a string variable that I use later. I haven't been able to find the solution to via searching so I thought I would ask.
I am automating a repetitive task that I have to do multiple times per day so I have created a dialog to capture the necessary information for this process. One of the items is a combo box with a long list to choose from. The dialog works great but for use later to choose from a combo box in internet explorer I need to return a string variable to choose the correct list item in the internet explorer combo box. I have posted all of my code below and then I broke out the code that I am struggling with.
Any help with how to return the selected item from the dialog combo box to set the value of a string variable would be most appreciated.
ENTIRE CODE
CODE THAT I NEED TO GET THE SELECTED ITEM AND RETURN THAT TO A STRING VARIABLE
Thanks Much!
pcdaugs
I am working with a dialog that I have created where I am using a combo box to select from. Anyway, I have been searching the forums for how to return the selected item to a string variable that I use later. I haven't been able to find the solution to via searching so I thought I would ask.
I am automating a repetitive task that I have to do multiple times per day so I have created a dialog to capture the necessary information for this process. One of the items is a combo box with a long list to choose from. The dialog works great but for use later to choose from a combo box in internet explorer I need to return a string variable to choose the correct list item in the internet explorer combo box. I have posted all of my code below and then I broke out the code that I am struggling with.
Any help with how to return the selected item from the dialog combo box to set the value of a string variable would be most appreciated.
ENTIRE CODE
Initalize the Dialog
str controls = "5 6 19 8 17 13 15 21 14 24 26 28 53 55 57 33 35 37 65 45 46 47 48 49 50 51 61 63 66 67 69 31"
str e5FN e6LN e19Gen e8DOB e17Sta e13SFN e15SLN e21SGe e14SDO e24AFN e26ALN e28Mtg e53TGP e55AUF e57IR cb33 cb35 cb37 c65Yes c45Yes c46Yes c47Yes c48Yes c49Yes c50Yes c51Yes cb61Cas e63 c66Yes e67 e69 cb31MB
cb31MB="$1,500[]$1,600[]$1,700[]$1,800[]$1,900[]$2,000[]$2,100[]$2,200[]$2,300[]$2,400[]$2,500[]$2,600[]$2,700[]$2,800[]$2,900[]$3,000[]$3,100[]$3,200[]$3,300[]$3,400[]$3,500[]$3,600[]$3,700[]$3,800[]$3,900[]$4,000[]$4,100[]$4,200[]$4,300[]$4,400[]$4,500[]$4,600[]$4,700[]$4,800[]$4,900[]$5,000[]$5,100[]$5,200[]$5,300[]$5,400[]$5,500[]$5,600[]$5,700[]$5,800[]$5,900[]$6,000[]$6,100[]$6,200[]$6,300[]$6,400[]$6,500[]$6,600[]$6,700[]$6,800[]$6,900[]$7,000[]$7,100[]$7,200[]$7,300[]$7,400[]$7,500[]$7,600[]$7,700[]$7,800[]$7,900[]$8,000[]$8,100[]$8,200[]$8,300[]$8,400[]$8,500[]$8,600[]$8,700[]$8,800[]$8,900[]$9,000[]$9,100[]$9,200[]$9,300[]$9,400[]$9,500[]$9,600[]$9,700[]$9,800[]$9,900[]$10,000[]$10,100[]$10,200[]$10,300[]$10,400[]$10,500[]$10,600[]$10,700[]$10,800[]$10,900[]$11,000[]$11,100[]$11,200[]$11,300[]$11,400[]$11,500[]$11,600[]$11,700[]$11,800[]$11,900[]$12,000[]$12,100[]$12,200[]$12,300[]$12,400[]$12,500[]$12,600[]$12,700[]$12,800[]$12,900[]$13,000[]$13,100[]$13,200[]$13,300[]$13,400[]$13,500[]$13,600[]$13,700[]$13,800[]$13,900[]$14,000[]$14,100[]$14,200[]$14,300[]$14,400[]$14,500[]$14,600[]$14,700[]$14,800[]$14,900[]$15,000"
cb33="2 Years[]3 Years[]4 Years[]5 Years[]6 Years[]8 Years[]10 Years"
cb35="30 Days[]60 Days[]90 Days[]180 Days[]365 Days"
cb37="5% Comp[]4.5% Comp[]4% Comp[]3.5% Comp[]3% Comp[]CPI Comp[]CPI to 75[]5% Simple[]Benefit Builder[]GPO[]None"
if(!ShowDialog("Dialog3" &Dialog3 &controls)) ret
Open's Genworth QuoteIt software in Internext Explorer
web "https://longtermcare.genworth.com/quoteit/landingPage.do" 1 "iexplore - Shortcut"
Clicks the "Next" button to move on to the next screen
int w=wait(3 WV win("Genworth Financial: LTC Quote It! - Windows Internet Explorer" "IEFrame"))
Acc a.Find(w "GRAPHIC" "" "value=https://longtermcare.genworth.com/quoteit/landingPage.do#" 0x3004 3)
a.DoDefaultAction
Click the Radio Button over to "Yes" this is a couple
if(e13SFN<>"") ;;Married Couple
Acc a1.Find(w "RADIOBUTTON" "" "a:id=SPyes[]a:name=strSpousePartner[]state=0x0 0" 0x3004 3)
a1.DoDefaultAction
Enter Data into quote engine
First Name 1st Spouse
Acc a2.Find(w "TEXT" "" "a:id=participantFirstName[]a:name=strParticipantFirstName" 0x3004 3)
a2.SetValue(F"{e5FN}")
Last Name 1st Spouse
Acc a3.Find(w "TEXT" "" "a:id=participantLastName[]a:name=strParticipantLastName" 0x3004 3)
a3.SetValue(F"{e6LN}")
Date of Birth 1st Spouse
Acc a4.Find(w "TEXT" "" "a:id=participantDateId[]a:name=strParticipantBirthDate" 0x3004 3)
a4.SetValue(F"{e8DOB}")
'T
Spouse First Name
Acc a5.Find(w "TEXT" "" "a:id=partnerFirstName[]a:name=strPartnerFirstName" 0x3004 3)
a5.SetValue(F"{e13SFN}")
Spouse Lase Name
Acc a6.Find(w "TEXT" "" "a:id=partnerLastName[]a:name=strPartnerLastName" 0x3004 3)
a6.SetValue(F"{e15SLN}")
Spouse Date of Birth
Acc a7.Find(w "TEXT" "" "a:id=partnerDateId[]a:name=strPartnerBirthDate" 0x3004 3)
a7.SetValue(F"{e14SDO}")
'T
State
Acc a8.Find(w "COMBOBOX" "" "a:id=participantState[]a:name=strResidentState" 0x3004 3)
a8.CbSelect(F"{e17Sta}")
else ;;Single Person
Enter Data into quote engine
First Name 1st Spouse
Acc a9.Find(w "TEXT" "" "a:id=participantFirstName[]a:name=strParticipantFirstName[]xy=649 386[]state=0x0 0x20000040" 0x3004 3)
a9.SetValue(F"{e5FN}")
Last Name 1st Spouse
Acc a10.Find(w "TEXT" "" "a:id=participantLastName[]a:name=strParticipantLastName" 0x3004 3)
a10.SetValue(F"{e6LN}")
Date of Birth 1st Spouse
Acc a11.Find(w "TEXT" "" "a:id=participantDateId[]a:name=strParticipantBirthDate" 0x3004 3)
a11.SetValue(F"{e8DOB}")
'T
State
Acc a12.Find(w "COMBOBOX" "" "a:id=participantState[]a:name=strResidentState" 0x3004 3)
a12.CbSelect(F"{e17Sta}")
Click Next
Acc a13.Find(w "LINK" " " "value=https://longtermcare.genworth.com/quoteit/submitSelectProduct.do#[]state=0x400000 0" 0x3005 3)
a13.DoDefaultAction
Plan Design
if(c65Yes = 1) ;; Shared Care
Acc a14.Find(w "STATICTEXT" "" "value=Privileged Choice Flex" 0x3014 3)
a14.Select(1)
key DDT ;; Down Down Tab
else ;; Individual Policies
Acc a15.Find(w "STATICTEXT" "" "value=Privileged Choice Flex" 0x3014 3)
a15.Select(1)
key TT
Monthly Maximum
cb31MB = cb31MB + " Per Month"
Acc a16.Find(w "COMBOBOX" "" "a:id=planEmployee.facilityCareMaximum[]a:name=planEmployee.facilityCareMaximum.selectedValue[]state=0x400 0" 0x3004 3)
a16.CbSelect(F"{cb31MB}")
'T
CODE THAT I NEED TO GET THE SELECTED ITEM AND RETURN THAT TO A STRING VARIABLE
Monthly Maximum
cb31MB = cb31MB + " Per Month"
Acc a16.Find(w "COMBOBOX" "" "a:id=planEmployee.facilityCareMaximum[]a:name=planEmployee.facilityCareMaximum.selectedValue[]state=0x400 0" 0x3004 3)
a16.CbSelect(F"{cb31MB}")
'T
Thanks Much!
pcdaugs