Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with sound files and syntax on this code snip

Status
Not open for further replies.

TonyU

Technical User
Feb 14, 2001
1,317
US

[tt]
How can I add a sound (.wav) file to this code ?


<SCRIPT language=&quot;vbscript&quot;>
Function DoWelcome()
Dim myHour
Dim myGreet
myHour = Hour(Now)
If myHour >= 0 and myHour < 12 Then
myGreet = &quot;Good Morning!&quot; Sound1.wav here that would say of course Good Morning.
ElseIf myHour >= 12 and myHour < 18 Then
myGreet = &quot;Good Afternoon!&quot;Sound2.wav herethat would say of course Good Afternoon
Else
myGreet = &quot;Good Evening! &quot;Sound3.wav herethat would say of course Good Evening
End If

DoWelcome = myGreet

End Function

Document.Write DoWelcome
</SCRIPT>

[tt]&quot;A Successful man is one who can build a firm foundation with the bricks that others throw at him&quot;[/tt]
[noevil]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top