PDA

View Full Version : I need help with downloading files! An easy way to display files to download



SteevieNiteHeat
02-27-2010, 03:50 PM
Hi all, a new project in the making, but has been halted after trying a few ways, to no avail.

Basically I need to display around 70 files to download, each download will be displayed with a title, and then the hidden data will be the download URL.

An example I have tried is a listbox with the program title as the item text, and the URL in the Item Data part, but I have no way of loading this on show (either from registry, text file or ini file)

An example:

Item Text Item Data

Program 1 http://www.myprog1.exe
Program 2 http://www.myprog2.exe
etc...

What I have managed to do is use this code:

ListBox.DeleteItem("ListBox1", -1);
tbl_folders = TextFile.ReadToTable(_DesktopFolder.."\\ProgList.txt");
for count = 1, Table.Count(tbl_folders) do
result = ListBox.AddItem("ListBox1", tbl_folders[count], "");
end


but in the listbox it just shows the url text, but I would like a way to store both the Item Text AND the Item Data so when it loads the page, it is all filled in, I am pulling my hair out here as I have a few apps & have made that are downloaders and listbox apps, but I cannot incorporate them into 1.

I have tried writing to the registry, an ini file AND a text file, but none do what I want, is there any way to do what I need?

I have also tried using a tree, but I have never been able to figure them out so have avoided them at all cost!

JimS
03-02-2010, 03:22 PM
Here, give this a try. :)