New Plugin to play sounds from default Windows sound scheme

nnCron and nnCron LITE discussion

New Plugin to play sounds from default Windows sound scheme

Postby Valery_Kondakoff » Mon, 29 Dec 2008, 14:54

Code: Select all
\ File:         play_default_sound.spf
\ Author:       Valery Kondakoff
\ Date:         29.12.2008
\ Words:      PLAY-DEFAULT-SOUND: ( a u -- )
\ Description:  Additional word to play sounds from default Windows sound scheme. Use one of the following strings as an argument:
\ "DeviceConnect"
\ "MailBeep"
\ "SystemAsterisk"
\ "SystemDefault"
\ "SystemExclamation"
\ "SystemExit"
\ "SystemHand"
\ If an argument was not recognized, the SystemDefault sound will be played instead. The sounds are played asynchronously (return immediately after beginning to play the sound and have it play in the background).

\ Usage: PLAY-DEFAULT-SOUND: "DeviceConnect"
\ Example:
\       #( test_def_snd
\       NoActive
\       Action:
\          PLAY-DEFAULT-SOUND: "SystemAsterisk"
\          PAUSE: 1000
\          PLAY-DEFAULT-SOUND: "DeviceConnect"
\          PAUSE: 1000
\          PLAY-DEFAULT-SOUND: "MailBeep"
\          PAUSE: 1000
\          PLAY-DEFAULT-SOUND: "SystemDefault"
\          PAUSE: 1000
\          PLAY-DEFAULT-SOUND: "SystemExclamation"
\          PAUSE: 1000
\          PLAY-DEFAULT-SOUND: "SystemExit"
\          PAUSE: 1000
\          PLAY-DEFAULT-SOUND: "SystemHand"
\       )#

: PLAY-DEFAULT-SOUND ( a u -- )
   1 0 2SWAP S>ZALLOC PlaySound DROP
;

: PLAY-DEFAULT-SOUND: eval-string, POSTPONE PLAY-DEFAULT-SOUND ; IMMEDIATE
CU
VK
User avatar
Valery_Kondakoff
Site Admin
 
Posts: 769
Joined: Thu, 01 Jul 2004, 20:49
Location: Moscow, Russia

Return to nnCron forum (English)

Who is online

Users browsing this forum: No registered users and 1 guest

cron