Here is some code I found but I dont see a MsgBox.
Can anyone help me get the file duration.
Code: Select all
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
PathToMediaInfoDLL := "C:\Program Files (x86)\MediaInfo.dll\MediaInfo_InfoTip.dll"
PathToAVIFile := "C:\Users\Audio1\Desktop\QCLoudness\SUV52 Michele Rigby Assad AM v1.mxf"
hModule := DllCall("LoadLibrary", "str", PathToMediaInfoDLL) ; Avoids the need for subsequent DllCalls to load the library
MediaInfo_New() {
Return DllCall( "mediainfo\MediaInfo" ( A_IsUnicode ? "" : "A" ) "_New" )
}
MediaInfo_Open( hnd, MediaFile ) {
Return DllCall( "mediainfo.dll\MediaInfo" ( A_IsUnicode ? "" : "A" ) "_Open", UInt,hnd
, Str,MediaFile, UInt )
}
MediaInfo_Get( hnd, StrK=0, StrN=0, Comm="", InfK=0, Srch=0 ) {
Return DllCall( "mediainfo.dll\MediaInfo" ( A_IsUnicode ? "" : "A" ) "_Get", UInt,hnd
, Int,StrK, Int,StrN, Str,Comm, Int,InfK, Int,Sech, Str )
}
MediaInfo_Close( hnd ) {
Return DllCall( "mediainfo\MediaInfo" ( A_IsUnicode ? "" : "A" ) "_Close", UInt,hnd )
}