Play Audio Action Icon

Play Audio

Declaration

<AMPLAYAUDIO FILE="text">

See Also

Play Audio | Speak | Volume | Connect to Network | Send IM | Map Drive | Empty Recycle Bin | Get Volume Information

Description

Plays the audio file specified. Supported audio formats are .WAV, .MP3, .AU and any other media player supported formats. Wildcards (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: 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 Properties

Property

Type

Req'd

Default

Markup

Description

Audio file(s) 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 Properties

The Description tab allows you to customize the text description of any step as it appears in the Task Builder's Steps Pane.

More on setting custom step description

Error Causes Properties

The Error Causes tab properties lets you instruct a task step to react only to specific errors or ignore certain errors that should cause it to fail.

More on Error Causes properties

On Error Properties

The On Error tab properties lets you determine what the task should do if a particular step encounters an error as defined in the Error Causes properties.

More about On Error properties

Additional Notes

Expressions, Variables & Functions

A percent sign is used as a special character in AutoMate to indicate the beginning and end of an expression. This allows variables, functions and other expressions to be entered in any text parameter of a task's properties. For example: %1+1% inside a task will resolve to 2 at runtime. A more elaborate example is %FileDateTime(myFile)% which results to the date/time of myFile. To help construct expressions, you can open Expression Builder by clicking the Insert Expression (%) button or by pressing F2.

More on expressions

More on variables

More on functions

More on extended functions
More on the expression builder

Example

NOTE: The code below can be copied and pasted directly into the Steps pane of the Task Builder.

 

Sample 1 - Play "myfavoritesong.mp3" located in "C:\myfavoriteband" folder.

 

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

 

 

Sample 2 - Play all songs in "C:\myfavoriteband" folder.

 

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

 

↑ Top of Page