Page 1 of 1

dumb question... get value of option button

Posted: Tue Mar 23, 2010 5:00 pm
by shawn
Dumb question I am sure but after searching for awhile I still haven't found the answer....

How do I get the selected value of an option button?

I have code in so when the button is changed by the user I get what they selected but I can't find how to simply read the selected value. I need this at startup.

Get returns all the possible choices in the option button, not the one selected by the user.

Thanks,

Shawn

Re: dumb question... get value of option button

Posted: Tue Mar 23, 2010 5:31 pm
by bn
Hi Shawn,
look at menuHistory in the dictionary,
it gives you an integer of the selected menuoption, with the text of button "myOptionButton" you get a list of the available options.

Code: Select all

on mouseUp
   put the menuhistory of btn 1 into tHist
   put the text of btn 1 into tText
   put line tHist of tText
end mouseUp
regards
Bernd

Re: dumb question... get value of option button

Posted: Tue Mar 23, 2010 6:57 pm
by shawn
Hi Bernd,

Thank you very much. That took care of it.

Shawn