Example:
Searching for MP3s and adding them to a list box

Actions used:

Dialog - Folder Browse

File - Search

List Box Object - Add Files

In this example, we'll let the user browse for a folder, and then we'll find all the MP3 files in that folder and add their filenames to a List Box Object.

Here's what the action list looks like:

First we use a "Dialog – Folder Browse" action to let the user specify which folder the MP3 files are located in. We use the %DeskTop% built-in variable as the default folder for the browse dialog, since that's as good a place as any for the user to start browsing from.

The full path to the folder that the user browses to will be stored in a variable called %SearchPath%. We'll use this variable as our custom search path for the "File - Search" action.

Notice that we've disabled the Local fixed drives (hard drives) option, so the file search action won't look all over the user's hard drive for text files. (We just want to search in the folder that the user selected with the "Dialog - File Browse" action.)

We've also changed the dialog title and text to reflect the nature of the search, and set "*.mp3" as the filename pattern to search for. The wildcard (*) means that any file with .mp3 at the end of its name will be considered a match.

All the matching filenames will be stored in a variable called %Files% as a double-semicolon (;;) delimited list.

Finally, we use a "List Box Object – Add Files" action to add all of the filenames stored in that %Files% variable to the end of the list in our List Box Object named "List Box - MP3 Filenames" (which, by the way, is a good example of an object name with spaces in it).

Here's a link to the finished example, as an AutoPlay Media Studio 4.0 page that you can import into your own project: