Multimedia - Play audio
Declaration
<AMPLAYAUDIO FILE="text">
Description
Plays the audio file specified. Supported audio formats are .WAV, .MP3 and any other media player supported formats. Wildcard characters (for example, * or ?) may be specified which will cause the files in the folder matching the specified mask to play one after another (as a playlist).
Practical usage
Used to play an audible alert. Common uses include: alarm clock, server audio notification, school bell system or any other application that requires audio to be played.
Parameters
General
Property | Type | Required | Default | Markup | Description |
---|---|---|---|---|---|
Audio file(s) to play | Text | Yes | (Empty) |
|
The file name of the audio file that should be played. The file type can be any type supported by your version of Windows and installed media services. To play more than one file use wildcards (for example, * or ?). This will cause the files in the folder matching the specified mask to play one after another (as a playlist). |
Examples
- Copy and paste the sample AML code below directly into the Task Builder Steps Panel.
- To successfully run the sample code, update parameters containing user credentials, files, file paths, or other information specific to the task to match your environment.
Example 1
This sample task plays an .mp3 file from a specific folder.
<AMMULTIMEDIA FILE="C:\myfavoriteband\myfavoritesong.mp3" />
Example 2
This sample task plays all audio formatted files (.mp3, .wav, etc.) located in a specific folder.
<AMMULTIMEDIA FILE="C:\myfavoriteband\*.*" />