home

Sound in Help Files - Help Authoring Site

home Buy This Domain search
Help Authoring: Sound in Help Files - Help Authoring Site

Sound in Help Files - Help Authoring Site

To run sound files in Help files.

1. Create a project macro to register the routine:

Sound=RegisterRoutine("mmsystem.dll", "sndPlaySound","Su")

2. Then add a hotspot macro to call the following:

sndPlaySound(`myfile.wav', 0)

where myfile.wav is the name of a wav file somewhere in the current path setting (ie can be in the same place as the .hlp file or can be in \windows directory)

SndPlaySound only plays wave files, not midi. This command cannot be interrupted before the file is finished playing. Use 1 instead of 0 to allow jumps while file is still playing. It will continue to play until done.

Another method is to use mci string commands:

RegisterRoutine("mmsystem.dll","mciSendString","SSuu")

mciSendString("play myfile.wav"," ", 0, 0)

This can play midi files too and allows jumps whilst the file is playing.

Use "play xxx.wav wait" to prevent interruptions.

Note second parameter must be " ", not "" - you need one space in there.

Help Authoring: Sound in Help Files - Help Authoring Site

Amazon Prime Free Trial


Help Authoring: Sound in Help Files - Help Authoring Site