yeto Posted July 3, 2019 Posted July 3, 2019 If Not @error Then SoundPlay (@WindowsDir & "Computer_Magic-10sec.wav", 1) EndIf The Beep function works fine but when I replace the Beep function with the SoundPlay function it does not play the wav file. The wav file is located on my computer hard drive. Any thoughts as to what I could be doing incorrectly? Thank you, yeto
1957classic Posted July 3, 2019 Posted July 3, 2019 You're missing a backslash. If Not @error Then SoundPlay (@WindowsDir & "\Computer_Magic-10sec.wav", 1) EndIf
yeto Posted July 4, 2019 Author Posted July 4, 2019 (edited) 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 July 4, 2019 by yeto
1957classic Posted July 4, 2019 Posted July 4, 2019 @WindowsDir = C:\Windows Where is the wav file located? Is it in the Windows Directory or on the Desktop?
yeto Posted July 4, 2019 Author Posted July 4, 2019 5 hours ago, 1957classic said: @WindowsDir = C:\Windows Where is the wav file located? Is it in the Windows Directory or on the Desktop? It is on my desktop.
FrancescoDiMuro Posted July 4, 2019 Posted July 4, 2019 30 minutes ago, yeto said: It is on my desktop. So why do you use @WindowsDir which clearly refers to the Windows Directory instead of @DesktopDir which clearly refers to the Desktop Dir? Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette
yeto Posted July 4, 2019 Author Posted July 4, 2019 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now