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)
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)
Comment