This is a wrapper for AudioGenie3.dll (Beta 2.0.0.2) by Stefan Töngi (
www.audiogenie.de). See
this AHK forum post for more details on AudioGenie.
You need the AudioGenie3.dll (Beta 2.0.0.2) =>
http://www.audiogenie.de/en/download.htm
and this code =>
http://www.autohotkey.net/~toralf/AG3/AG3.ahk
All functions start with "AG3", except three functions which are general:
Code:
ATOU( ByRef Unicode, Ansi ) ; converts Ansi to Unicode (by SKAN)
UTOA( pUnicode ) ; converts Unicode to Ansi (by SKAN)
AscToHex(S){ ; converts ASCII to Hex (by Laszlo)
This is a Demo script. Place some mp3 files in the same directory or specify a path to some mp3 files
Code:
#NoEnv
#SingleInstance Force
SetBatchLines, -1
OnExit, Exit
;specify all ID3 text or URL frameIDs you are interested in (APIC will be added at the end automatically)
ListOfFrames = TALB,TIT1,TIT2,TIT3,TPE1,TPE2,TPE3,TPE4,TPOS,TRCK,TYER,COMM
Language = Eng ;set language (DEU or ENG)
; FilePath := "X:\Artist A-Z\0-9\" ;specify path to some mp3 files
#Include AG3.ahk ;include AudioGenie3 wrapper
AG3_Init() ;start AudioGenie3 und GDI+
AG3_LogFile("AG3.log") ;set log file
;get list of files and add it to listbox
Loop, %FilePath%*.mp3
ListFileNames .= A_LoopFileName . "|"
Gui, 1:Add, ListBox, w200 r32 vLsbFileName gLsbFileName , %ListFileNames%
;create for each frameID a text field with description in specified language
;Plus a text field for the picture type
Loop, Parse, ListOfFrames, `,
{
Option := A_Index = 1 ? "ym" : ""
Gui, 1:Add, Text, %Option% vTxtFrame%A_LoopField%, % AG3_FrameIDName(A_LoopField, Language)
}
Gui, 1:Add, Text, vTxtFrameAPIC, % AG3_PictureTypeName(3, Language)
;create for each frameID an ReadOnly edit control on GUI for the content of the FrameID
;Plus a picture control for the first picture
Loop, Parse, ListOfFrames, `,
{
Option := A_Index = 1 ? "ym" : ""
Gui, 1:Add, Edit, %Option% w200 r1 vEdtFrame%A_LoopField% ReadOnly ,
}
SS_BITMAP = 0xE
Gui, 1:Add, Picture, w100 h100 %SS_BITMAP% vPctAPIC HwndhPctAPIC,
Gui, 1:Show, AutoSize Restore, AudioGenie3 Wrapper Demo ;show GUI
Return
;user selected a file in listbox
LsbFileName:
Gui, 1:Submit,NoHide ;get file name
AG3_Open(FilePath LsbFileName) ;open it with AudioGenie3
Loop, Parse, ListOfFrames, `, ;get content of all FrameIDs
GuiControl, 1:, EdtFrame%A_LoopField%, % AG3_ID3TFrame(A_LoopField)
If AG3_GetID3PictureCount(){ ;check if picture available
AG3_ShowID3Picture(hPctAPIC, 1) ;show picture and adjust picture type name
GuiControl, 1:, TxtFrameAPIC, % AG3_PictureTypeName(AG3_GetID3PictureType(1), Language)
}Else{
AG3_ShowID3Picture(hPctAPIC) ;remove any shown picture from control
GuiControl, 1:Move, PctAPIC, W100 H100 ;resize control
GuiControl, 1:, TxtFrameAPIC, % AG3_PictureTypeName(3, Language) ;reset text info
}
Return
Esc::
GuiClose:
Exit:
AG3_Stop() ;stop AudiGenie3 und GDI+
ExitApp
Return
Screenshot of demo script
