ludocus Posted May 17, 2008 Share Posted May 17, 2008 (edited) Hi,This udf works (almost) the same as Sound udf there is just a slight change in the mcisendstringhave a look:the udf:expandcollapse popup#cs ---------------------------------------------------------------------------- AutoIt Version: 3.2.11.7 (beta) Author: ludocus Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here Func mciSendString($string) Local $iRet $iRet = DllCall("winmm.dll", "int", "mciSendStringA", "str", $string, "str", "", "int", 65534, "hwnd", 0) If Not @error Then Return $iRet[2] EndFunc ;==>mciSendString Func _MovieOpen($pFile, $pHwnd, $pTop, $pLeft, $pWidth, $pHeight, $pAlias='') if $pAlias = '' then $pAlias = RandomStr(10) mciSendString("close "&$pAlias) if Not @error Then mciSendString("open " & FileGetShortName($pFile) & " alias "&$pAlias) mciSendString("window "&$pAlias&" handle " & Number($pHwnd)) mciSendString("put "&$pAlias&" destination at "&$pTop&' '&$pLeft&' '&$pWidth&' '&$pHeight) return $pAlias Else return 0 EndIf EndFunc func _MovieClose($hAlias) return mciSendString("close "&$hAlias) EndFunc func _MoviePause($rAlias) return mciSendString("pause "&$rAlias) EndFunc func _MovieStop($jAlias) return mciSendString("seek " &$jAlias& " to start") EndFunc func _MoviePlay($sAlias) mciSendString("set Test_Video time format milliseconds") If mciSendString("status "&$sAlias&" position") = mciSendString("status "&$sAlias&" length") Then mciSendString("seek "&$sAlias&" to start") mciSendString("play "&$sAlias) return 1 EndFunc func _MoviePos($tAlias) $sReturn = mciSendString("status "&$tAlias&" position") if @error then return 0 return $sReturn EndFunc func _MovieLength($tAlias) $tReturn = mciSendString("status "&$tAlias&" length") if @error then return 0 return $tReturn EndFunc func _MovieSeek($sSnd_id, $iHour, $iMin, $iSec) Local $iMs = 0 Local $iRet mciSendString("set " & FileGetShortName($sSnd_id) & " time format miliseconds") $iMs += $iSec * 1000 $iMs += $iMin * 60 * 1000 $iMs += $iHour * 60 * 60 * 1000 $iRet = mciSendString("seek " &$sSnd_id& " to " & $iMs) If $iRet = 0 Then Return 1 Else Return SetError(1, 0, 0) EndIf EndFunc func _MovieStatus($kAlias) Return mciSendString("status "&$kAlias&" mode") EndFunc Func RandomStr($len) Local $string For $iCurrentPos = 1 To $len $string &= Chr(Random(97, 122, 1)) Next Return $string EndFuncEnjoy! Edited May 17, 2008 by ludocus Link to comment Share on other sites More sharing options...
ludocus Posted May 17, 2008 Author Share Posted May 17, 2008 Comments are welcome Link to comment Share on other sites More sharing options...
Synapse Posted May 17, 2008 Share Posted May 17, 2008 This is awsome....thx ludocus i`ve been w8ing 4 a long time for something like this.....thx again...and keep up the good work !! Link to comment Share on other sites More sharing options...
ludocus Posted May 17, 2008 Author Share Posted May 17, 2008 no problem. Lol, i like your avatar Link to comment Share on other sites More sharing options...
joseLB Posted December 16, 2008 Share Posted December 16, 2008 (edited) great sofware, Ludocus. Simple and efficent. I tried with a lot of kind of movies and it worked with all. Most of them, GUICtrlCreateAvi didnt work... Thanks Jose Edited December 16, 2008 by joseLB Link to comment Share on other sites More sharing options...
Zisly Posted December 16, 2008 Share Posted December 16, 2008 Which video formats does it support? Link to comment Share on other sites More sharing options...
Michel Claveau Posted December 17, 2008 Share Posted December 17, 2008 (edited) Hi! Very fun & easy. Run with many windows (WordPad/Write ; Excel ; Explorer ; etc. etc.) Don't run inside several windows (notepad, terminal, ...) A good application of MCI Thanks, Ludocus. Edited December 17, 2008 by Michel Claveau Link to comment Share on other sites More sharing options...
joseLB Posted December 17, 2008 Share Posted December 17, 2008 Which video formats does it support?Well, I ran it with some videos that where inside my computer. I suppose that plain avi, windows media, divx, and some avi I have no idea how they where generated.But I also believe that it only runs the kind of movies your PC supports, (codecs). I suggest you try it. Link to comment Share on other sites More sharing options...
Michel Claveau Posted December 18, 2008 Share Posted December 18, 2008 Hi!...I suppose...I have no idea how they where generated...Ludocus used MCI (Media Control Interface ). MCI is inside Windows since (very) long time (win 95)See:http://msdn.microsoft.com/en-us/library/ms709461(VS.85).aspxhttp://en.wikipedia.org/wiki/Multimedia_Control_Interfacehttp://support.microsoft.com/kb/142731 Link to comment Share on other sites More sharing options...
ludocus Posted December 18, 2008 Author Share Posted December 18, 2008 Well, I ran it with some videos that where inside my computer. I suppose that plain avi, windows media, divx, and some avi I have no idea how they where generated.But I also believe that it only runs the kind of movies your PC supports, (codecs). I suggest you try it.I know how to fix it.. but im not really doing autoit at the moment.. so you'll have to wait.. Link to comment Share on other sites More sharing options...
joseLB Posted December 18, 2008 Share Posted December 18, 2008 I know how to fix it.. but im not really doing autoit at the moment.. so you'll have to wait..Hi Ludocus, I didn't find any problems. I meant that with all kind of videos I tried (that where at hand), they worked OK... And I meant that most of them I don't know how they where generated, as an ".avi" movie can be a divx, etc., etc. generated movie.On other hand, the standard guiCtrlCreateavi didn't work on almost all videos I tested (same of above).Your's it a great udf... simple, efficient and straight to the point.Jose Link to comment Share on other sites More sharing options...
ludocus Posted December 20, 2008 Author Share Posted December 20, 2008 misunderstanding then.. Thnx! Link to comment Share on other sites More sharing options...
matwachich Posted January 2, 2011 Share Posted January 2, 2011 For me, the video is playing too fast, and without sound!!! Any solution??? Link to comment Share on other sites More sharing options...
ChangMinYang Posted January 3, 2011 Share Posted January 3, 2011 (edited) :: Ludocus Your method is so beautiful. Thanks a lot. $sStrA = ycmGet_CryptHASH( $iLinA , $sPathA , "MD5" ) ; I used this instead 'Random String' Edited January 3, 2011 by ChangMinYang 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