Jump to content

Why won't this .wav file play using the SoundPlay function?


Recommended Posts

4 hours ago, 1957classic said:

You're missing a backslash.

 

If Not @error Then
    SoundPlay (@WindowsDir & "\Computer_Magic-10sec.wav", 1)
        EndIf

 

I tried that and it still won't play. I also changed the code to the full path and still no audio.

If Not @error Then
    SoundPlay (@WindowsDir & "C:\Users\?????\Desktop\MP3s & WAV\Computer_Magic-10sec.wav", 1)
        EndIf

Could it be that the script needs to loop or continue or something for the wav file to play? I also changed from SoundPlay to Beep and set Beep for 5 seconds and the Beep worked fine and lasted for the full 5 seconds.

Edited by yeto
Link to comment
Share on other sites

4 hours ago, FrancescoDiMuro said:

So why do you use @WindowsDir which clearly refers to the Windows Directory instead of @DesktopDir which clearly refers to the Desktop Dir? :)

Honestly, because I don't know what the H@!! I am doing. I am trying to learn though. The SciTE Soundplay help file example said to use @WindowsDir. 

Thank you for taking time to reply. This is very helpful.

Kind regards,
yeto

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...