O.P. [Help] Need help with list of files in array...
Hi!
im writing a file server script for the new plus, sorta like the xdcc in irc, where the user can see a list of files in the chat windows and request them and they will be sent to them through the chat like a normal file transfer.
I have dumped file names, paths, attributes, etc... in arrays and i want to send a rather large number of files to choose from to the user.
now msn has a maximum amount of characters and lines that can be sent per message, lets say there are 100 music files in my array.
if i use the SendMessage command and give it my array as the parameter, this is what the message will look like:
D:\Music\Music\#04 - Creed - With Arms Wide Open.mp3,D:\Music\Music\(01) Justin Timberlake - Senorita.wma,D:\Music\Music\(09) Joe Budden - Fire (ft. Busta Rhymes).wma,D:\Music\Music\(10) Andre 3000 - Roses.wma,D:\Music\Music\(10) Tyrese - all ghetto ...
and etc...
now removing the paths and numbering the files all that i will do later on.
my question is, how can output this array so that each file will come on a new line and they will all be sent in one message, untill the capacity of that message is reached, and the rest follow in the next message...
sort of like this.
Example User Says:
D:\Music\Music\#04 - Creed - With Arms Wide Open
D:\Music\Music\(01) Justin Timberlake - Senorita.wma
D:\Music\Music\(09) Joe Budden - Fire.wma
D:\Music\Music\(10) Andre 3000 - Roses.wma
D:\Music\Music\(10) Tyrese - all ghetto
upto the maximum number of lines...
Example User Says:
and the rest of the files...
thank you.
This post was edited on 06-26-2006 at 07:07 AM by b0rna.
|