PDA

View Full Version : Copying MP3 files to MP3 players



Arty-Media
10-27-2005, 10:24 AM
Hi, here is the .apz file for my mp3 player copier, hope someone can help me make it do what it needs to do!

TJ_Tigger
10-27-2005, 10:52 AM
Hi, here is the .apz file for my mp3 player copier, hope someone can help me make it do what it needs to do!

You can try this in the Copy button


--Get the drive letter
tSel = ListBox.GetSelected("tblDrives")
if tSel then
strDrive = ListBox.GetItemText("tblDrives", tSel[1])
--Get Files
tSel = ListBox.GetSelected("files")
if tSel then
--copy each item
for i,v in tSel do
--get the data element which contains the file name
strFile = ListBox.GetItemData("files", tSel[i]);
--copy to the drive above, you could add a callback function to show the files being copies
--there is a callback function in the help file.
File.Copy(strFile, strDrive, false, false, false, true, nil);
end
else
Dialog.Message("Songs", "Select the files you want to copy to your ".. strDrive.." Drive");
end
else
Dialog.Message("Drive", "Please select a drive where you want to copy your music");
return;
end

Arty-Media
10-27-2005, 10:57 AM
thanks for that, but when i run a program with a blank list box it then it wont run, i just get the following error:

title box: Microsoft Visual C++ Runtime Library

Runtime Error!

Program: E:\cd_root\autorun.exe

abnormal program termination

DOes anyone know how this is stopped?

Worm
10-27-2005, 11:42 AM
I made some changes to your app. I tried to comment the areas that I changed. I think your going to want to use a callback on your copy to give the user a visual of what's going on, but I left that for you to hammer on a bit. Post back if you need help.