Run Action Icon

CD Player Action

Declaration

<AMCDPLAYER ACTION="text [options]" DRIVELETTER="text" TRACKS="text" WAIT="yes/no">

See Also

Speak, Play Audio

Description

Controls the CD drive on the system. This is only for audio CD's. To specify multiple tracks when using the "Play Tracks" option, separate the tracks with a dash (e.g. 2-5 will play tracks 2 through 5).

Practical Usage

Used to play a music CD. Common uses include: alarm clock, server audio notification, radio music broadcast system or any other application that requires audio to be played.

Parameters

General Tab

CD ROM Drive to Use
Text, Required
MARKUP:
a) DRIVELETTER="default"
b) DRIVELETTER="f:"

Specifies the drive letter of the CD-ROM that the command should be directed to. If set to "default" the default CD-ROM drive is used.

Action
Options, Required
MARKUP:
a) ACTION="stop"
b) ACTION="play"

Specifies the action that should be performed on the CD-ROM drive.

The available options are:

play: Causes the CD-ROM to begin playing the audio CD from the first to the last track

stop: Causes the CD-ROM to stop playing the audio CD.

pause: Causes the CD-ROM to pause playback of the audio CD

previous: Causes the CD-ROM to go back one track on the currently playing audio CD

next: Causes the CD-ROM to skip to the next track on the currently playing the audio CD

open: Causes the CD-ROM to eject or open the drive door.

close: Causes the CD-ROM to close the tray or drive door.

playtrack: Causes the CD-ROM to begin playing the track(s) specified in the Track [TRACK] parameter.

next: Causes the CD-ROM to begin playing the audio CD

Tracks
Text, Required
MARKUP:
a) TRACKS="4"
b) TRACKS="2,5,9"
c) TRACKS="1-3"

Valid only when the Action [ACTION] parameter is set to "playtrack". Specifies the tracks that should be played. To specify multiple tracks separate the tracks with a dash (e.g. 2-5 will play tracks 2 through 5) or a comma (e.g. 1,5 will play tracks 1 and 5) .

Wait
Yes/No, Optional Default No
MARKUP: WAIT="ES"

Valid only when Action [ACTION] is set to Play ["play"] or Play Track ["playtrack"]. When set to YES, causes the task to stop at the current step and not move on until the entire CD or the specified tracks have finished playing. When set to NO, CD Player will return and allow the task to continue immediately while the CD is playing.

Notes

Standard Error Handling Options
This action also includes the standard "Error Causes" and "On Error" failure handling options/tabs

More on Error Handling Options

Variables and Expressions
All text fields allow the use of expressions by surrounding the expression in percentage signs (example: %MYVARIABLE%, %Left('Text',2)%). To help construct these expressions, a popup expression builder is available in all these fields by pressing F2.
More on variables...
More on expressions...
More on the expression builder...

Example

<AMCDPLAYER DRIVELETTER="default" ACTION="previous" WAIT="YES">

<AMCDPLAYER DRIVELETTER="F:" ACTION="play">

<AMCDPLAYER DRIVELETTER="default" ACTION="playtrack" TRACK="1-5" WAIT="YES">