PDA

View Full Version : Create a listbox


MacGyver
06-24-2007, 05:11 PM
Hi...

I think there was someone that ask this question but still not answer what i wnat to do. The idea is to create a listbox with choices, when we click it open a aplication. the way iīm making it opens all them. Could someone help how i make the script to avoid that?


Thanks

RizlaUK
06-24-2007, 05:33 PM
post what code you have so we can see where you are going wrong

EDIT: (in case this is what you need)

here is a small code snippet that will get the selected item in the listbox and launch the file (assuming that the path is stored in the data field of the listbox)
sel = ListBox.GetSelected("ListBox1");
if sel then
selData = ListBox.GetItemData("ListBox1", sel[1]);
result = File.Run(selData, "", "", SW_SHOWNORMAL, false);
end

MacGyver
06-26-2007, 06:40 AM
Thank you for your help, sorry i didnīt put any script. I was trying with the examples that came in the program but i was putting in the wrong order.


Thanks anyway

-= K =-
07-25-2007, 01:30 PM
How do you specify the path in the list box? is it necessary to use a Variable for the source folder, if so what is the variable?

Thanks

nevermind, figured it out