Multimedia - Play audio

 

Declaration

<AMPLAYAUDIO FILE="text">

Related Topics   

Description

Plays the audio file specified. Supported audio formats are .WAV, .MP3 and any other media player supported formats. Wildcard characters (i.e. * or ?) may be specified which will cause the files in the folder matching the specified mask to play one after another (as a playlist). Note that the step will not continue until the file has finished playing.

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 files to play

Text

Yes

(Empty)

  1. FILE="C:\folder\filename.mp3"

  2. FILE="C:\folder\*.*"

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 i.e. * or ?). This will cause the files in the folder matching the specified mask to play one after another (as a playlist).

Description

Error Causes

On Error

Examples

NOTE:
  • The sample AML code below can be copied and pasted directly into the Steps Panel of the Task Builder.
  • Parameters containing user credentials, files, file paths, and/or other information specific to the task must be customized before the sample code can run successfully.

Example 1

This sample task plays an .mp3 file from a specific folder.

Copy
<AMMULTIMEDIA FILE="C:\myfavoriteband\myfavoritesong.mp3" />

Example 2

This sample task plays all audio formatted files (.mp3, .wav, etc.) located in a specific folder.

Copy
<AMMULTIMEDIA FILE="C:\myfavoriteband\*.*" />