PDA

View Full Version : ListBox - Multiple File Format Question


Rubix101
02-16-2003, 08:49 PM
Hello all...

I am currently running the actions listed below to allow a user to execute a file shown in the list box. My problem is that the actions below work well for a .exe file however I also have .txt files in that list as well which obviously wont work with this script. How can I set this up so that no matter which file the user selects it will automatically determine whether it is a .exe or .txt and then run the appropriate action.

Thanks for the help!

%SelectedIndex% = ListBoxObject[ListBox1].GetSelected
%ItemData% = ListBoxObject[ListBox1].GetItemData (%SelectedIndex%)
File.Execute ("%ItemData%", "", Continue)

Corey
02-16-2003, 08:52 PM
Use a FILE > OPEN action instead of FILE > EXECUTE. That'll work.

Corey Milner
Creative Director, Indigo Rose Software (http://www.indigorose.com)

Rubix101
02-16-2003, 08:56 PM
Genius!

Thank you so much for the quick response!

Corey
02-16-2003, 10:49 PM
np /ubbthreads/images/icons/smile.gif

Corey Milner
Creative Director, Indigo Rose Software (http://www.indigorose.com)