I am using a piece of code from Bernd to load a numeric sequence of .wav files into play buttons and then rename buttons to match the wav files. It's for a music loop playing app.
This is the strange bit. I have over 100 wav files to load and everything works fine until the code strikes this section below.... then for some reason it cuts the numeric sequence 91 -99??? I have set up text fields to test what is going on after each load.
Code: Select all
repeat with i = 1 to the number of buttons
if name of button i contains "Track" then put the short name of button i & comma after tbuttonList
end repeat
delete last char of tButtonlist
sort items numeric of tButtonlist by last word of each
put tButtonlist into field "Test"
repeat with i = 1 to the number of items of tButtonList
set the label of button (item i of tButtonlist) to line i of field "AudioNames"
end repeat
end mouseUp
I've tried renaming the numeric sequence but it still happens. If I cut the files 91-99 and put them in a seperate directory they load fine but in the sequence 1-100 they get cut out ( but only from the tButonList sequence of the code)???
EDIT: OOPs! Found the problem! It was my coding error. I had messed up the button names.

(moderators please feel free to delete this unessesary thread)
Thanks
Bidge