Krakatoa Posted December 18, 2015 Share Posted December 18, 2015 (edited) MediaInfo AuMediaInfo Au is MediaInfo Lite in Autoit.+basic and full info+drag and dropsource code:expandcollapse popup#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=icon.ico #AutoIt3Wrapper_Res_Comment=MediaInfo #AutoIt3Wrapper_Res_Description=MediaInfoAu #AutoIt3Wrapper_Res_Fileversion=2015.12.18.1 #AutoIt3Wrapper_Res_Language=1033 #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <Array.au3> #include <FontConstants.au3> $sFileVersion = FileGetVersion("MediaInfo.dll") GUICreate("MediaInfo " & $sFileVersion, 600, 600, -1, -1, $WS_SIZEBOX, $WS_EX_ACCEPTFILES) If $CmdLine[0] > 0 Then $_file = $CmdLine[1] Else $_file = "" EndIf Local $info = GUICtrlCreateEdit( "", 0, 0, 598, 575, $ES_AUTOVSCROLL + $WS_VSCROLL + $ES_READONLY) If $_file <> "" Then $data = _ArrayToString(_MediaInfodll($_file, ""), @CRLF) GUICtrlSetData($info, $data) EndIf GUICtrlSetState(-1, $GUI_DROPACCEPTED) GUICtrlSetFont($info, 9, $FW_DONTCARE, $GUI_FONTNORMAL, "Consolas") GUICtrlSetState ( $info, $GUI_FOCUS ) Local $idContextmenu = GUICtrlCreateContextMenu() Local $idOpen = GUICtrlCreateMenuItem("Otevřít", $idContextmenu) GUICtrlCreateMenuItem("", $idContextmenu) ; separator Local $idMenuLite = GUICtrlCreateMenuItem("Základní výpis", $idContextmenu) Local $idMenuFull = GUICtrlCreateMenuItem("Kompletní výpis", $idContextmenu) Local $idSave = GUICtrlCreateMenuItem("Uložit výpis", $idContextmenu) GUICtrlCreateMenuItem("", $idContextmenu) ; separator Local $idMenuInfo = GUICtrlCreateMenuItem("O programu", $idContextmenu) GUISetState(@SW_SHOW) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $idMenuFull $data = _ArrayToString(_MediaInfodll($_file, "1"), @CRLF) GUICtrlSetData($info, $data) Case $idMenuLite $data = _ArrayToString(_MediaInfodll($_file, ""), @CRLF) GUICtrlSetData($info, $data) Case $idMenuInfo MsgBox(0, " O programu MediaInfoKK", "Vytvořil Krakatoa" & @CRLF & "http://krakatoa.www3.cz/") Case $GUI_EVENT_DROPPED If @GUI_DropId = $info Then $_file = @GUI_DragFile $data = _ArrayToString(_MediaInfodll($_file, ""), @CRLF) GUICtrlSetData($info, $data) EndIf Case $idOpen $_file_tmp = FileOpenDialog("Otevřít", @HomeDrive, "Vše (*.*)") If not @error Then $_file = $_file_tmp $data = _ArrayToString(_MediaInfodll($_file, ""), @CRLF) GUICtrlSetData($info, $data) EndIf Case $idSave $sFilePath = FileSaveDialog("Uložit", @HomeDrive, "Log (*.txt)", "log") If not @error Then Local $hFileOpen = FileOpen($sFilePath, 2) If not @error Then FileWrite($hFileOpen, $data) EndIf EndSwitch WEnd Func _MediaInfodll ( $_file, $complete ) $_Dll = DllOpen ( "MediaInfo.dll" ) $_Handle = DllCall ( $_Dll, "ptr", "MediaInfo_New" ) DllCall ( $_Dll, "int", "MediaInfo_Open", "ptr", $_Handle[0], "wstr", $_file ) DllCall ( $_Dll, "wstr", "MediaInfo_Option", "ptr", 0, "wstr", "Complete", "wstr", $complete ) $_Inform = DllCall ( $_Dll, "wstr", "MediaInfo_Inform", "ptr", $_Handle[0], "int", 0 ) DllClose ( $_Dll ) $_Return = StringSplit ( $_Inform[0], @lf ) If Not @error Then Return $_Return Else Return 0 EndIf EndFuncsetup source code (inno setup):[Setup] AppName=MediaInfo AppVersion=2015.12.18.01 DefaultDirName={pf}\MediaInfo DefaultGroupName=MediaInfo UninstallDisplayIcon={pf}\MediaInfo\MediaInfo.exe SolidCompression=yes ; Pouze 64bit: ; ArchitecturesInstallIn64BitMode=x64 [Files] Source: "{app}\MediaInfo.exe"; DestDir: "{app}" Source: "{app}\MediaInfo.dll"; DestDir: "{app}" [Registry] Root: HKCR; Subkey: "*\shell\MediaInfo"; Flags: uninsdeletekey Root: HKCR; Subkey: "*\shell\MediaInfo"; ValueType: string; ValueName: "Icon"; ValueData: "{app}\MediaInfo.exe" Root: HKCR; Subkey: "*\shell\MediaInfo\Command"; ValueType: string; ValueData: """{app}\MediaInfo.exe"" ""%1""" [UninstallDelete] Type: filesandordirs; Name: "{app}" [Icons] Name: "{group}\MediaInfo"; Filename: "{app}\MediaInfo.exe" [Languages] Name: "czech"; MessagesFile: "compiler:Languages\Czech.isl";Info, source code, binary and screen:http://krakatoa.www3.cz/mediainfo-au.php Edited December 18, 2015 by Krakatoa 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