Thank you for helping me with the script.

Sealeopard, the plan is not to distribute any media player. Instead let the other members of the choir use their standard player for wav-files.


Chris S, isn't that what this function is for? To close down Sndrec32.exe, windows standard player, when the file has reached the end? Your script close down the windows form immediately after opening up.

Function fnPlayWav($sWavFile)
If Not Exist($sWavFile) Exit 2 EndIf
$objShell = CreateObject("WScript.Shell")
Exit $objShell.Run ("Sndrec32.exe /play /close " + $sWavFile , 0, 0)
EndFunction


Lonkero , maybe that's the way to do it; to fire each wav-file as a seperate script – or another process. Lacking experience with KiXtart – is it possible for someone to help me with a script for this? To substitute:

$Button1.OnClick = "PLAY Bess12.wav "

with what – for starting a separate process or a seperate script – as in which I immediately can restart... and restart....

Anyhow, thank you for helping me!

Best regards
Lasse Roald