Multimedia - CD control

Declaration

<AMMULTIMEDIA ACTIVITY="cd_player" DRIVELETTER="text" ACTION="text (options)" TRACK="number" WAIT="YES/NO" />

Related Topics   

Description

Controls the CD drive on the computer.

Practical usage

Commonly used to simulate an alarm clock, server audio notification tool, radio music broadcast system or any other application that requires audio to be played. This activity supports audio cd operations only.

Parameters

General

Property Type Required Default Markup Description
CD Rom drive to use Text Yes (Empty)
  • DRIVELETTER="default"
  • DRIVELETTER="f:"
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 Yes (None)
  • ACTION="play"
  • ACTION="pause"
  • ACTION="resume"
  • ACTION="stop"
  • ACTION="previous"
  • ACTION="next"
  • ACTION="open"
  • ACTION="close"
The action that should be performed on the CD-ROM drive. If unsure, hover the mouse over each button to determine its action. The available options are:
  • Play - Causes the CD-ROM to begin playing the audio CD from the first to the last track
  • Pause - Causes the CD-ROM to pause playback of the audio CD
  • Resume - Causes the CD-ROM to resume playing the audio CD from the current track.
  • Stop - Causes the CD-ROM to stop playing 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.
  • Play Track - Causes the CD-ROM to begin playing the tracks specified in the Track parameter.
  • Test -Tests functionality of CD-ROM drive.
Track Number Yes (Empty)
  • TRACKS="4"
  • TRACKS="2,5,9"
  • TRACKS="1-3"
The tracks that should be played. To specify multiple tracks, separate them with a dash (for example, 2-5 will play tracks 2 through 5) or a comma (for example, 1,5 will play tracks 1 and 5). Valid only when the Action parameter is set to Play, Resume, or Play Track.   
Wait for tracks to finish before continuing task Yes/No No No WAIT="YES" If selected, causes the task to stop at the current step and not continue until the entire CD or the specified tracks have finished playing. When disabled, the CD Player will return and allow the task to continue immediately while the CD is playing.

Description

Error Causes

On Error

Examples

NOTE:
  • 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 goes to the previous track on the default CD drive and then waits until the track is finished playing before continuing.

Copy
<AMMULTIMEDIA ACTIVITY="cd_player" WAIT="YES" />

Example 2

This sample task plays the CD in the CD player labeled as the "F" drive.

Copy
<AMMULTIMEDIA ACTIVITY="cd_player" DRIVELETTER="F" />

Example 3

This sample task plays tracks 1 to 5 on the CD located in the default drive and then waits until the tracks are finished playing before continuing.

Copy
<AMMULTIMEDIA ACTIVITY="cd_player" DRIVELETTER="F" WAIT="YES" />