How do I...?

Create a File Browser

In AutoPlay Media Studio it is possible to have a list of files that the user can click on to open.

As an example, we will create a listbox with two movie choices in it. The user will click on one of the files, and click a button to open the file.

  1. Create a listbox object.

  2. Add the movie names, and the path to the movies:



     

  3. Create a button.

  4. In the On Click event of the button actions, add the following script:

selected = ListBox.GetSelected("ListBox1");
file = ListBox.GetItemData("ListBox1", selected[1]);
File.Open(file, "", SW_SHOWNORMAL)

Note: If you have enabled the Multiple Selection option for your listbox, the example above will only open the first file loaded into 'file'.


Applies to:

Professional Edition