Page 1 of 1

display second value in a variable

Posted: Fri May 20, 2016 1:56 pm
by kevin007
Hi All,

I have an variable that contains the following string

1-10
2-15
3-45
5-60


when I give 1 in textfield 10 should display
when I give 2 in textfield 15 should display
when I give 2 in textfield 45 should display
How I do this ? :(
kevin007

Re: display second value in a variable

Posted: Fri May 20, 2016 2:14 pm
by Klaus
Hi Kevin,
when I give 1...
GIVE??? :shock:

Anyway, you can:
...
set itemdel to "-"
...
and then loop through all LINES of your variable and do something
with ITEM 1 and ITEM 2 of each line. Sounds a bit familiar, doesn't it? 8)


Best

Klaus

Re: display second value in a variable

Posted: Mon May 23, 2016 6:15 am
by kevin007
@Klaus

many Thanks for your idea and it's working :)