Random Chars
Posted: Fri Feb 21, 2014 11:06 pm
Hello everyone...new question of the day for me....I am trying to assign each label of a group of buttons to a random character and am running into issues....I just simply want to randomly pick a letter between A-Z and assign the button that letter. So far I am having some luck but out of the 50 buttons I have in the group, only about 1/2 of those actually get a random character. Not sure why...I am using a repeat loop to assign each button a random letter from a field...maybe someone can help....thanks
Code: Select all
local pLetter
on mouseUp
repeat with x=1 to the number of btns in group "alpha"
put any char of fld "alphabet" into pLetter
set the label of btn x to pLetter
put empty into pLetter
end repeat
end mouseUp