hi i need help in sound i know code that code Sound
will work but if i make it F.exe and if i copy the F.exe out Folder the have F.Mp3 don't work i went make it work in any Driver Example D:\a\F.exe went it work F:\a\F.exe went it work E:\a\F.exe went it work G:\a\F.exe went it work C:\a\F.exe went it work can help?
Code:
#include <Sound.au3>
Local $aSound = _SoundOpen("F:\a\F.mp3")
If @error = 2 Then
MsgBox(0, "Error", "The file does not exist")
Exit
ElseIf @extended <> 0 Then
Local $iExtended = @extended ; Assign because @extended will be set after DllCall.
Local $tText = DllStructCreate("char[128]")
DllCall("winmm.dll", "short", "mciGetErrorStringA", "str", $iExtended, "ptr", DllStructGetPtr($tText), "int", 128)
MsgBox(0, "Error", "The open failed." & @CRLF & "Error Number: " & $iExtended & @CRLF & "Error Description: " & DllStructGetData($tText, 1) & @CRLF & "Please Note: The sound may still play correctly.")
Else
MsgBox(0, "Success", "The file opened successfully")
EndIf
_SoundPlay($aSound, 1)
_SoundClose($aSound)