fileList = []
repeat with i = 1 to the maxInteger
thisFileName = getNthFileNameInfolder(<your target folder>, i)
if thisFileName = EMPTY then
exit repeat
add(fileList, thisFileName)
end if
end repeatThen to display the list in a text or field member
listAsString = ''
nItems = count(fileList)
repeat with i = 1 to nItems
thisFileName = fileList[i]
put (thisFileName & return) after listAsString
end repeat
delete the last char of listAsString -- eliminate final extra RETURN
member("<your display member>").text = listAsStringThen you still have the list in the variable fileList.
However, if you just want to display the list of files, you can eliminate the list entirely like this (again untested e-mail Lingo):
listAsString = ""
repeat with i = 1 to the maxInteger
thisFileName = getNthFileNameInFolder(<your target folder>, i)
put (thisFileName & return) after listAsString
end repeat
delete the last char of listAsString
member("<your text member>").text = listAsStringIrv
At 2:50 PM +0200 8/18/03, Tony �str�m wrote:
Hi List,
I getNthFileNameinFolder into a gSoundList an put RETURN after every filename then
on mouseUp
nLine = the mouseLine
if nLine > 0 then
sprite(me.spriteNum).member.line[nLine].hilite()gSoundList[nLine]
end if
end
When I click below the last filename in the scrollable field I get the error "Index out of range!" I can understand that.
How can I delete the RETURN after the last filename in the gSoundList?
TIA Tony
[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]
--
Multimedia Wrangler. [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]
