Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2003
    Posts
    2

    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. #2
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746

    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

  3. #3
    Join Date
    Feb 2003
    Posts
    2

    Re: ListBox - Multiple File Format Question

    Genius!

    Thank you so much for the quick response!

  4. #4
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746

    Re: ListBox - Multiple File Format Question

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

    Corey Milner
    Creative Director, Indigo Rose Software

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts