Selection list headache

I am having fun with selecting from a selection list

The selection list is A, B, C, D, E, F. Each of the selection points to a different chart in the application. Also the letters are different colors. The list is not a static pulldown but uses the last letter selected to determine if the list is displayed up or down from that point.

I created a function that I could call to select a letter a chart no matter what letter was previously selected

to selectChart Letter
Create variables List + A, List + B, etc
Get rectangle for List
Calculate and store locations
Click ListA

I was able to utilize a static text location to select activate the selection list. I am trying to utilize a function to maximize flexibilty by building varible names using the List + Letter. (Example: ListA, ListB, etc) Then I put a location for each letter into each variable based on a rectangle formed from the list. I just adjust x,y coordinates for each letter. (Example: put (300,200) +(7,15) into ListA)Since the location is never the same this allows me to build a dynamic list of locations after each time the List is accessed.

Based on the function call I them try to use the location for the new chart but now the part I am running into problems with is “clicking” on the built variable name. click(ListA) -> “Cannot find image ListA” same with click ListA

To work with a dynamic (eg: constructed) variable name, you will want to use the value() function to have SenseTalk evaluate the construct.

click value("List" & Letter)

If I’ve misunderstand the nature of what you are asking or where the problem is please let me know.

It worked perfectly :smiley:

Thanks