PDA

View Full Version : ListBox to Text File


AudioSam
01-13-2007, 05:51 AM
Hello,

I am trying my best to search and do things on my own but I cannot figure out
how to put files in a listbox and then save a single item.
I want to save the single item as a single file.
Listbox is Music Files
A
B
C
select A and save as m3u which I know is only a text file with the path back to the selected listbox item.
Can someone help me with this?
Thank You
AudioSam

RizlaUK
01-13-2007, 09:26 AM
Hi AudioSam, iv attached a very simple example for you

hope it helps

AudioSam
01-13-2007, 01:49 PM
Thank You Rizlauk,

I guess some day I will get the hang of all of these codes.
At this time I can't figure out when to use what.
I can only dig through the forum and attempt to change code that I find.
Thank You again for helping me. I really tried but as I said, I can't really figure
out what to do first.I will keep watching all of you and hopefully be able to put something together that I can show. You and all of the others that are good at this really deserve a hand. I fight this stuff for hours and days and will not give up easily. I thinks me brain just isn't cut out for it. LoL

Thank You Friend ,
Sam

RizlaUK
01-13-2007, 02:24 PM
Hey Sam, i know the feeling, thats how i started with programing, just editing other peoples examples and hopeing for the best,

i must say that ams is the easyest tool iv ever come across and after useing it for a little under a year i am getting to grips with it now, but i still have much to learn, but this forum is full of very helpfull members that will help if thay can so that kinda makes life a little easyer and the help file that comes with ams explains every function and command in detail, i would suggest having a good read of it to get to know some of the functions and what thay do,

good luck with your project :)

AudioSam
01-14-2007, 08:31 AM
Hey , what you posted as an example is very good.
I took it and changed a little code here and there and kinda lucked up and got my Mp....I mean my music player working without the media player plugin .
Add , Remove , Loop Forever , Add All Files to Playlist , Add Single Track , Number of files in each list.
You know ...just a bunch of stuff.
I do have another question, or maybe need another example.
I have it so far as to double click on a file in the first listbox and a message comes up what to name the file I have clicked on..I meant to do this, but is their a way that you have code for to just automatically name X.selected file to X.m3u with same name.
I could also put that in the add single file button on click event.Same thing you know. Just which ever I set up. I would probally put it in the on click button event and remove it from double click event of listbox1.
To explain , instead of sending it to C:\\ playlist.m3u , I send each selected track to a defined folder and am able to type in a name of the m3u. I would like for it to name the file to the m3u file the name of the original.
Automatic Only on single m3u files.

On albums or where I have X # of files I just save all to m3u and then I do name them whatever I want, or need to.

Am I asking to much?

Thank You Again,
I will try to get this to the point of showing it.I am sure you already have your player set up.I will let you look at this and see what you think, before I get laughed at by the forum....Then maybe it will be something others may be intrested in.
Comming Soon!!! The Big Mess By: AudioSam lol
I am also working on a few button sets so maybe that will be something someone may be intrested in.

RizlaUK
01-14-2007, 03:08 PM
Hi Sam, i updated my example to suit your needs

it now has 2 buttons for saveing playlist, the 1st original button will now ask for a folder to save the file to and it will name the file .m3u the same as the file selected

the second button will save all selected files, it will ask for a name for the playlist and ask for a folder to save it to

i put all the code in global functions (so you can just use the function in your project) and i commented it so you can see what is going on


and i dont think anyone will laugh at you m8, we all started where you are and we all had to ask the same questions,

i learned so much from other peoples examples that i dont mind making them for new users, as with every one i make im learning something new

i am very interested to see your project so good luck with it and....buttons.....**** yeah, can never have enough, lol

here, i hope this is more what you are needing

AudioSam
01-14-2007, 04:15 PM
I really Thank You for helping me.
I haven't looked at your latest example.
Iam trying to write this first.
I know I explained that kinda messy earlier.
I don't want to wear out my welcome but you seem to have the right answers to all my questions.
To make it brief.
1. I wanted to click in the List box1 and auto name the file I clicked with ext.
m3u. It would then show up in my M3u playlist.
-------------------------------- Different Question------------------
2. I have tried and looked and had no luck with clicking a file in Listbox1
and sending it to listbox2 and keep same file information.
This is to be able to load 100 songs , click 1 of them and put it into a second listbox.This way I can choose like 10 songs and then make my m3u file.
If you can help me with that I would be on track and not bother you for awhile.

I'll try to check back to see if I can catch you.
Thank You, Thank You
Sam

AudioSam
01-14-2007, 04:59 PM
Update.
Great, I took that example and set it up so that it adds the m3u to the playlist folder.
Very Good.
Thank You,Thank You
Now for that last challange.....
Mp3 from ListBox1 to ListBox2 and what I think is a very nice player is about to be ready.

Can you help me with that?

Thank You very much.
Man You guys deserve the praise.....
I'm not worthy.....lol
That is a nice little app by its self that you posted.

RizlaUK
01-14-2007, 05:31 PM
ok, here you go, 2 listboxes, add your files to the playlist and click save playlist and everything in listbox2 is saved to a m3u file, with add and remove buttons,

again, all the code is in global, that way you can just rip the functions


That is a nice little app by its self that you posted.

Thanks, this one is even better, lol

AudioSam
01-14-2007, 05:33 PM
Thanks my friend.
I will have to send this to you so you can see what its about.
Do you have a player that you made?
I'll check right back.

AudioSam
01-14-2007, 05:43 PM
BTW..
Is it hard to save it to the second listbox as an mp3??
Thats the part I'm missing right now.
Right now I'm having to save as m3u , then click the m3u to put it into my main playlist.
I would like to put my mp3's in listbox1, from there click selected and add to listbox2 .Then I would save like the 10 files I want for my m3u Album File.You may have already covered this with one of your apps. I'll have to look to see if I can work what you have shown me into doing the Mp3 listbox1 to Mp3 listbox2
You have put together some good stuff.
Thank you for spending time helping me.

AudioSam
01-14-2007, 05:46 PM
Yep,
I think you covered my last headache with your last App.
Thank You.

RizlaUK
01-14-2007, 05:49 PM
Hey, no problem sam, glad to help

AudioSam
01-15-2007, 07:52 AM
Hello,

That worked Great.
Thank You for your help.
I'll be sending you a message in a few hours.
I'll let you look at this. You probally have a player thats not dependent on
the media player plugin. If not this will be something you may like.
I don't know how you figure out all the code but it works.
Thank You again.
AudioSam