Quantcast
Channel: Take Command / TCC
Viewing all articles
Browse latest Browse all 1742

CHOOSE just one

$
0
0
Here's how I choose just one item from a short list of items,
Code:
R:\>function choose 
%@word[%@eval[%1-1],%2$]

Examples;
Code:
R:\>echo %@choose[3,One Two Three Four Five Six Seven Eight Nine Ten] 
Three 

R:\>echo %@choose[7,One Two Three Four Five Six Seven Eight Nine Ten]
Seven

R:\>set theItems=One Two Three Four Five Six Seven Eight Nine Ten

R:\>echo %@choose[5,%theItems] 
Five

You can also select just one item from a short list of items via a Popup Selection Window.

Joe

Viewing all articles
Browse latest Browse all 1742

Trending Articles