Sound Object

A Sound object represents a single audio/music recording.

Sound Type Commands

Sound.systemBeep v2.0.5

Returns the sound the user has set for their Mac system beep alert noise.

Sound.systemSounds v2.0.5

Returns an array of all available Mac system sounds.

Sound.systemSoundWithName v2.0.5

Returns the system Sound object with the given name, or the @undefined value if no such sound is available/installed, eg:

$beep = Sound.systemSoundWithName("Basso")

Sound.soundWithFileAtPath filePath v2.0.5

Returns a Sound object holding the contents of the file at the given path. What kinds of files can be played depends on macOS, but can include audio file formats like WAVE and mp3. If the given file does not exist, or the audio format is not supported, returns the @undefined value.

Sound Object Properties

.name v2.0.5

The name of the sound. Read-only.

.filePath v2.0.5

The path to the sound file on disk. Read-only.

.isPlaying v2.0.5

Either @true or @false, depending on whether or not the sound is currently playing. Read-only.

Sound Object Commands

.play v2.0.5

Starts playing the sound so it is audible over the computer speakers. The entire sound is played exactly once, even if the macro finishes running.

.pause v2.0.5

Suspends playing the sound until it is resumed.

.play v2.0.5

If it is playing, stops playing the sound.


Previous Chapter
Size Object
<<  index  >>
 
Next Chapter
Menus