nobbe Posted January 19, 2007 Share Posted January 19, 2007 hi Autoit 3.2.2 in module "Sound.au3" i added a few lines to play differnet fileformat too and video (original code didnt display video output on my machine ) Func _SoundOpen($hFile, $sAlias = "") ;Declare variables Local $sSnd_id, $iCurrentPos, $iRet ;check for file If Not FileExists($hFile) Then Return SetError(2, 0, 0) ;search for whitespace by character For $iCurrentPos = 1 To StringLen($sAlias) If StringIsSpace(StringMid($sAlias, $iCurrentPos, 1)) Then Return SetError(3, 0, 0) Next ;create random alias if one is not supplied If $sAlias = "" Then $sSnd_id = RandomStr(10) Else $sSnd_id = $sAlias EndIf ; ; for opening other files as well (AVI, MUS, DIVX) ; ; MUS = MPEG 1 Layer2 audio file format for Broadcast Station (DAB) etc .. ; If StringInStr(FileGetShortName($hFile), ".MUS") > 0 Or StringInStr(FileGetShortName($hFile), ".AVI") Or StringInStr(FileGetShortName($hFile), ".DIVX") Then $iRet = mciSendString("open " & FileGetShortName($hFile) & " type MPEGVideo alias " & $sSnd_id) Else $iRet = mciSendString("open " & FileGetShortName($hFile) & " alias " & $sSnd_id) EndIf ; --- end enhancement Return SetError(0, $iRet, $sSnd_id) EndFunc ;==>_SoundOpen Link to comment Share on other sites More sharing options...
Developers Jos Posted January 19, 2007 Developers Share Posted January 19, 2007 Is this a Bug report ? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
nobbe Posted January 19, 2007 Author Share Posted January 19, 2007 hi maybe better move in developer category?? i wasnt shure Link to comment Share on other sites More sharing options...
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