How do i get which radio button is on...
Like...
if>Dialog1.radiobutton=checked,dosomethihng...how do you tell which one is check? Mines set up like this
(radio)1 Token
(radio)2 Tokens
(radio)3 Tokens
(radio)4 Tokens
(radio)5 Tokens
then do like this..
if 5 tokens = check then do something
radio buttons
Moderators: Dorian (MJT support), JRL
-
- Junior Coder
- Posts: 49
- Joined: Fri Oct 15, 2004 8:42 am
- Location: Johannesburg, South Africa
Referencing Radio Buttons
I concur - it is not that obvious - even tho it is mentioned in the Help ... under Dialog. F11 properties does not give you a clue either.
Try this one on for size ....
...
RadioGroup=msRadioGroup1,msRadioGroup1,128,72,97,113,One%CRLF%Two%CRLF%Three,-1
...
Show>myDialog,result
Messagemodal>Result=%result%%CRLF%RadioValue=%myDialog.msRadioGroup1%
You refer to the name of the Radiogroup of the dialog. (Dialog.RadioGroupName)
It is set to the caption "list" value selected , e.g. "Two".
Meths
Try this one on for size ....
...
RadioGroup=msRadioGroup1,msRadioGroup1,128,72,97,113,One%CRLF%Two%CRLF%Three,-1
...
Show>myDialog,result
Messagemodal>Result=%result%%CRLF%RadioValue=%myDialog.msRadioGroup1%
You refer to the name of the Radiogroup of the dialog. (Dialog.RadioGroupName)
It is set to the caption "list" value selected , e.g. "Two".
Meths
-
- Pro Scripter
- Posts: 63
- Joined: Sat Dec 25, 2004 3:23 pm
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Here is an rough example that will show radionbuttons.
There really is no example in the Help section.
Code: Select all
Dialog>Dialog3
Caption=Dialog3
Top=269
Width=451
Left=65
Height=250
RadioGroup=TokenGroup,Choice,96,32,185,105,1 token%CRLF%2 tokens%CRLF%3 tokens,-1
Button=OK,144,144,75,25,0
EndDialog>Dialog3
Show>Dialog3,result
If>%Dialog3.TokenGroup%=2 tokens,Here,There
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
Here you go hope this helps.
Dialog>select_dialog
Caption=Tokens
Top=223
Width=123
Left=407
Height=187
RadioGroup=msRadioGroup1,Select Bet,8,8,97,97,1 Token%CRLF%1 Tokens%CRLF%3 Tokens%CRLF%4 Tokens%CRLF%5 Tokens,-1
Button=GO,16,112,81,25,1
EndDialog>select_dialog
show>select_dialog,r
if>r=1,get bet
if>r=2,exit
label>get bet
goto>%select_dialog.msRadioGroup1%
label>1 Token
//do something
goto>main program
label>2 Tokens
//do something
goto>main program
label>3 Tokens
//do something
goto>main program
label>4 Tokens
//do something
goto>main program
label>5 Tokens
//do something
goto>main program
label>main program
//main script here
label>exit
Dialog>select_dialog
Caption=Tokens
Top=223
Width=123
Left=407
Height=187
RadioGroup=msRadioGroup1,Select Bet,8,8,97,97,1 Token%CRLF%1 Tokens%CRLF%3 Tokens%CRLF%4 Tokens%CRLF%5 Tokens,-1
Button=GO,16,112,81,25,1
EndDialog>select_dialog
show>select_dialog,r
if>r=1,get bet
if>r=2,exit
label>get bet
goto>%select_dialog.msRadioGroup1%
label>1 Token
//do something
goto>main program
label>2 Tokens
//do something
goto>main program
label>3 Tokens
//do something
goto>main program
label>4 Tokens
//do something
goto>main program
label>5 Tokens
//do something
goto>main program
label>main program
//main script here
label>exit
-
- Pro Scripter
- Posts: 63
- Joined: Sat Dec 25, 2004 3:23 pm