Announcement

Collapse
No announcement yet.

ListBox - Multiple File Format Question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • ListBox - Multiple File Format Question

    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)

  • #2
    Re: ListBox - Multiple File Format Question

    Use a FILE > OPEN action instead of FILE > EXECUTE. That'll work.

    Corey Milner
    Creative Director, Indigo Rose Software

    Comment


    • #3
      Re: ListBox - Multiple File Format Question

      Genius!

      Thank you so much for the quick response!

      Comment


      • #4
        Re: ListBox - Multiple File Format Question

        np [img]/ubbthreads/images/icons/smile.gif[/img]

        Corey Milner
        Creative Director, Indigo Rose Software

        Comment

        Working...
        X