Play Windows sounds

New to R5, the example code below displays all the sounds on the local PC and prompts the user to select one to play. You can modify the "Call" line to specifically call a desiried sound in your scripts or agents.
LotusScript


Dim workspace As New NotesUIWorkspace
Dim tunes As Variant
tunes = workspace.GetListOfTunes()
	
Dim messagelist As String
Forall tunelist In tunes
	messagelist = messagelist & tunelist & Chr(10)
End Forall	
	
Messagebox messagelist
	
Call workspace.PlayTune(Inputbox("Tune name:"))

Posted by fbrefere001 on Tuesday June 25, 2002