Perfect ! Thanks a lot.
I only have to change the visual style to fit the ahk editor/mini player.I am leaving it as a separate program and calling your GUI with a hotkey ( i do not want to mess it up as it works well ! )
[ Music Files Tag Editor written in Autohotkey ]
Re: [ Music Files Tag Editor written in Autohotkey ]
You're welcome .noname wrote:Perfect ! Thanks a lot.
I only have to change the visual style to fit the ahk editor/mini player.I am leaving it as a separate program and calling your GUI with a hotkey ( i do not want to mess it up as it works well ! )
aka Rajat
Re: [ Music Files Tag Editor written in Autohotkey ]
Unfortunately there is a serious drawback using audiogenie the cover art is not visible in standard players or the mp3tag program.I can only see it using audiogenie to get it like in my own ahk player.
Files send to friends do not show it ( like in GomPlayer )
screenshot ahk player with audiogenie:
http://i.imgur.com/NamWS5O.png
I wonder if it is also a winXP? problem.I will still have to use mp3tag to get the job done
Re: [ Music Files Tag Editor written in Autohotkey ]
Sorry It was my fault. (it's easy to blame Audiogenie) I forget set some flag in Audiogenie During adding CoverArt. Please Download the new attachment or script below. It should Work Fine.noname wrote:
Unfortunately there is a serious drawback using audiogenie the cover art is not visible in standard players or the mp3tag program.I can only see it using audiogenie to get it like in my own ahk player.
Files send to friends do not show it ( like in GomPlayer )
screenshot ahk player with audiogenie:
http://i.imgur.com/NamWS5O.png
I wonder if it is also a winXP? problem.I will still have to use mp3tag to get the job done
And Let me know if problem still occurs.
Bug Fixed :-
*Cover Art was not adding Properly.
*Navigation to next cover Art was not taking place through < > Arrows.
Code: Select all
;_____________________________________
; A Very Simple Version Of tag Editor with minimalistic Requirements and interface
; Good Example of Audiogenie
; Author - Rajat Kosh
; Email - [email protected]
;_______________________________
;Add Gui Element
Gui, Add, Edit, x12 y9 w340 h20 ReadOnly vfile_dir,
Gui, Add, Button, x252 y39 w100 h20 , Browse
Gui, Add, Text, x12 y69 w40 h30 , Artist
Gui, Add, Text, x12 y99 w40 h30 , Album
Gui, Add, Text, x12 y129 w40 h30 , Track
Gui, Add, Text, x12 y159 w40 h30 , Title
Gui, Add, Text, x12 y189 w40 h30 , Year
Gui, Add, Text, x12 y219 w40 h30 , Genre
Gui, Add, Text, x12 y249 w40 h30 , Comm
Gui, Add, Edit, x52 y69 w290 h20 vArtist,
Gui, Add, Edit, x52 y99 w290 h20 vAlbum,
Gui, Add, Edit, x52 y129 w290 h20 vTrack,
Gui, Add, Edit, x52 y159 w290 h20 vTitle,
Gui, Add, Edit, x52 y189 w290 h20 vYear,
Gui, Add, Edit, x52 y219 w290 h20 vGenre,
Gui, Add, Edit, x52 y249 w290 h20 vComments,
Gui, Add, Button, x142 y389 w100 h30 , Save
Gui, Add, pic, x12 y279 w90 h90 vAlb_art,
Gui, Add, GroupBox, x12 y279 w110 h100 , Album Art
Gui, Add, Button, x132 y289 w110 h20 , Add Album Art
Gui, Add, Button, x132 y319 w110 h20 , Remove Album Art
Gui, Add, Text, x132 y344 w150 h30 vcovertype, 0/0 No Cover
; Multiple cover navigation Symbols
Symbollft := Chr(9664)
Symbolrit := Chr(9654)
; Add them to GUI as Button
Gui, Add, button , x132 y370 w17 h17 vprcov gupdwn ,%Symbollft% ;Up down
Gui, Add, button , x149 y370 w17 h17 vnxcov gupupn ,%Symbolrit% ;Up Next
;Disable them (by default)
GuiControl , disable, prcov
GuiControl , disable, nxcov
;Show the GUI
Gui, Show, w364 h441, Tag
library := DllCall( "LoadLibrary", Str,"AudioGenie3.dll" )
DllCall( "AudioGenie3\AUDIOAnalyzeFileW", Str,Dummy ) ; Dummy Call
return
;################################################ OPEN FILE #################################################
ButtonBrowse: ;Prompt User For Opening the file
FileSelectFile ,ChooseFile, , , Select Your Music File(s) (Do Not Add Video Files for Tagging), All Supported Type (*.mp3;*.mp2;*.mp1;*.ogg;*.oga;*.wav;*.aif;*.aiff;*.aifc;*.flac;*.wma;*.wmv;*.wmp;*.asf;*.aac;*.mp4;*.m4a;*.m4b;*.m4p;*.wv;*.wvc;*.ape;*.mpc;*.mpp;*.mp+;*.ac3;*.spx;*.tta;*.opus;)
if Choosefile= ; IF no file is selected
{
return
}
reload_same_file: ;Jump here in case of refreshing the data
GuiControl , , file_dir , %ChooseFile%
loop , %ChooseFile%
{
DllCall("AudioGenie3.dll\AUDIOAnalyzeFileW", Str,A_LoopFileFullPath )
}
SplitPath, Choosefile,,, FileExtn ; Get Extension
;Get Information in Fields According to file type
if FileExtn in MP3,AAC,MPP,TTA
{
Trackinfo := DllCall("AudioGenie3\ID3V2GetTextFrameW", uint, 1414677323,wstr)
Titleinfo := DllCall("AudioGenie3\ID3V2GetTextFrameW", uint, 1414091826,wstr)
Artistinfo := DllCall("AudioGenie3\ID3V2GetTextFrameW", uint, 1414546737,wstr)
Albuminfo := DllCall("AudioGenie3\ID3V2GetTextFrameW", uint, 1413565506,wstr)
Genreinfo := DllCall("AudioGenie3\ID3V2GetTextFrameW", uint, 1413697358,wstr)
Yearinfo := DllCall("AudioGenie3\ID3V2GetTextFrameW", uint, 1415136594,wstr)
Composerinfo := DllCall("AudioGenie3\ID3V2GetTextFrameW", uint, 1413697357,wstr)
Commentinfo := DllCall("AudioGenie3\ID3V2GetTextFrameW", uint, 1129270605,wstr)
} else {
Artistinfo := DllCall("AudioGenie3\AUDIOGetArtistW",wstr)
Albuminfo := DllCall("AudioGenie3\AUDIOGetAlbumW",wstr)
Yearinfo := DllCall("AudioGenie3\AUDIOGetYearW",wstr)
Genreinfo := DllCall("AudioGenie3\AUDIOGetGenreW",wstr)
Trackinfo := DllCall("AudioGenie3\AUDIOGetTrackW",wstr)
Titleinfo := DllCall("AudioGenie3\AUDIOGetTitleW" ,wstr)
Commentinfo := DllCall("AudioGenie3\AUDIOGetCommentW", wstr)
Composerinfo := DllCall("AudioGenie3\AUDIOGetComposerW",wstr)
}
;Set Data into the fields
GuiControl,, Title, %Titleinfo%
GuiControl,, Artist, %Artistinfo%
GuiControl,, Album, %Albuminfo%
GuiControl,, Year, %Yearinfo%
GuiControl,, Track, %Trackinfo%
GuiControl,, Comments, %Commentinfo%
GuiControl,, Genre, %Genreinfo%
;Check for Cover Art in temp folder, Delete if already exists
IfExist , %A_Temp%\AlbumArt.jpg
FileDelete , %A_Temp%\AlbumArt.jpg
IfExist , %A_Temp%\AlbumArt.png
FileDelete , %A_Temp%\AlbumArt.png
;Retrieve the cover art from the file
;Check all possible cover art and extract them into the temp folder for showing onto GUI
;########################### MP4 ########################
Mime := DllCall("AudioGenie3\MP4GetPictureMimeW",uint, 01,wstr)
IfInString , Mime , jpg
DllCall("AudioGenie3\MP4GetPictureFileW", wstr , A_Temp "\AlbumArt.jpg", uint, 01)
else
DllCall("AudioGenie3\MP4GetPictureFileW", wstr , A_Temp "\AlbumArt.png", uint, 01)
;########################### FLAC ########################
Mime := DllCall("AudioGenie3\FLACGetPictureMimeW",uint, 01,wstr)
IfInString , Mime, jpeg
DllCall("AudioGenie3\FLACGetPictureFileW", wstr , A_Temp "\AlbumArt.jpg", uint, 01)
else
DllCall("AudioGenie3\FLACGetPictureFileW", wstr , A_Temp "\AlbumArt.png", uint, 01)
;########################### MP3 ########################
Mime := DllCall("AudioGenie3\ID3V2GetPictureMimeW",uint, 01,wstr)
IfInString , Mime, jpeg
DllCall("AudioGenie3\ID3V2GetPictureFileW", wstr , A_Temp "\AlbumArt.jpg", uint, 01)
else
DllCall("AudioGenie3\ID3V2GetPictureFileW", wstr , A_Temp "\AlbumArt.png", uint, 01)
;########################### WMA ########################
Mime := DllCall("AudioGenie3\WMAGetPictureMimeW",uint, 01,wstr)
if(Mime = jpg)
DllCall("AudioGenie3\WMAGetPictureFileW", wstr , A_Temp "\AlbumArt.jpg", uint, 01)
else (Mime = png)
DllCall("AudioGenie3\WMAGetPictureFileW", wstr , A_Temp "\AlbumArt.png", uint, 01)
; Set Extracted Cover Art onto the GUI
IfExist , %A_Temp%\AlbumArt.png ; Check if PNG
GuiControl,, Alb_art, *w90 *h90 %A_Temp%\AlbumArt.png
IfNotExist , %A_Temp%\AlbumArt.png ;If not PNG
{
IfExist , %A_Temp%\AlbumArt.jpg ;Check JPG
GuiControl,, Alb_art, *w90 *h90 %A_Temp%\AlbumArt.jpg
else ;If not JPG then Set Empty
GuiControl,, Alb_art, *w90 *h90 empty.png
}
;Now Check For Cover Description info and Total No. of Covers
; First CHeck For MP3
covertypeinfo:= DllCall("AudioGenie3\ID3V2GetPictureTypeTextW", uint, 1,wstr)
coverSize:= DllCall("AudioGenie3\ID3V2GetPictureSizeW", uint, 1)
PicNum := DllCall("AudioGenie3\ID3V2GetFrameCountW", uint, 1095780675)
if covertypeinfo= ;If Not in MP3
{
;Check in FLAC
Covertypeinfo:=DllCall("AudioGenie3\FLACGetPictureTypeTextW",uint ,01,wstr)
coverSize:= DllCall("AudioGenie3\FLACGetPictureSizeW", uint, 1)
Picnum := DllCall("AudioGenie3\FLACGetPictureCountW", uint, 1, uint)
Picnum := Picnum - 9568256
if covertypeinfo= ;If not in FLAC , check for mp4
{
Covertypeinfo= No Description
coverSize:= DllCall("AudioGenie3\MP4GetPictureSizeW", uint, 1)
Picnum := DllCall("AudioGenie3\MP4GetPictureCountW", uint, 1)
if coverSize= ;Else check in WMA
{
coverSize:= DllCall("AudioGenie3\WMAGetPictureSizeW", uint, 1)
Picnum := DllCall("AudioGenie3\WMAGetPictureCountW", uint, 1)
}
}
}
Updown := 1 ;Set Value of Current (Default) Cover Art index to 1
;Set information of cover Art
GuiControl, , covertype,%Updown%/%Picnum% %Covertypeinfo% - %coverSize% Bytes
if (Picnum <= 1) ;PicNum = Total Number of Pictures in Tag
{
GuiControl , disable, prcov
GuiControl , disable, nxcov
if (Picnum < 1)
{
Updown := 0
}
}else{
GuiControl , enable, prcov
GuiControl , enable, nxcov
}
return
;######################################## Change Album Art ##############################################################
ButtonAddAlbumArt:
Gui +OwnDialogs ; Forces user to dismiss the following dialog before using main window.
FileSelectFile , CoverFile , 3, , Choose Your Cover Art, Image Files(*.jpg;*.jpeg;*.png;) ; Select Cover File
if CoverFile= ; IF Empty, then return
return
;Else Set Cover Art according to supproted format type
; Note - A Random no. is required in order to create a unique ID because No two frames of cover Art (Multiple Art)
; Can have the same Description
CoverType = 3 ; Default Index For Front Cover
Random , uniq , 102 , 345622
if FileExtn in MP3,AAC,MPP,TTA
{
CoverDes = Added Using IDTE - Id3 Tag Editor [Unique ID = %uniq%]
DllCall("AudioGenie3\ID3V2AddPictureFileW",str,Coverfile,str,CoverDes,Uint,CoverType,Int,0)
errorcode := DllCall("AudioGenie3\AUDIOSaveChangesW")
}
else if FileExtn in FLAC
{
CoverDes = Added Using IDTE - Id3 Tag Editor [Unique ID = %uniq%]
DllCall("AudioGenie3\FLACAddPictureFileW",str,Coverfile,str,CoverDes,Uint,CoverType,Int,0)
errorcode := DllCall("AudioGenie3\AUDIOSaveChangesW")
}
else if FileExtn in MP4,M4A,M4B,M4P
{
DllCall("AudioGenie3\MP4AddPictureFileW",str,Coverfile)
errorcode := DllCall("AudioGenie3\AUDIOSaveChangesW")
}
else if FileExtn in WMA,ASF
{
CoverDes = Added Using IDTE - Id3 Tag Editor [Unique ID = %uniq%]
DllCall("AudioGenie3\WMAAddPictureFileW",str,Coverfile,str,CoverDes,Uint,CoverType,Int,0)
errorcode := DllCall("AudioGenie3\AUDIOSaveChangesW")
}
; Check if Added Sucessfully
if(errorcode<>-1)
MsgBox , An Error is encountered while adding Album Art
else
MsgBox , Album Art Added Sucessfully
;Refresh Changes
gosub , reload_same_file
return
;################################################ REMOVE ALBUM ART #######################################
ButtonRemoveAlbumArt:
Gui +OwnDialogs ; Forces user to dismiss the following dialog before using main window.
MsgBox ,36, Wait..,Are You Sure?`n ;Prompt First
IfMsgBox , No
return
;Analyze file
loop , %ChooseFile%
{
DllCall("AudioGenie3.dll\AUDIOAnalyzeFileW", Str,A_LoopFileFullPath )
}
;Remove Cover According to Supported Type
; Note - Only One Cover at a Time is removed therefore in case of multiple coverarts a repeatedly action
; Should be applied.
if FileExtn in MP3,AAC,MPP,TTA
{
DllCall("AudioGenie3\ID3V2DeleteSelectedFrameW",uint,1095780675,uint,Updown)
errorcode := DllCall("AudioGenie3\AUDIOSaveChangesW")
}
else if FileExtn in FLAC
{
DllCall("AudioGenie3\FLACDeletePictureW",Uint,Updown)
errorcode := DllCall("AudioGenie3\AUDIOSaveChangesW")
}
else if FileExtn in MP4,M4A,M4B,M4P
{
DllCall("AudioGenie3\MP4DeletePictureW",Uint,Updown)
errorcode := DllCall("AudioGenie3\AUDIOSaveChangesW")
}
else if FileExtn in WMA,WMV,WMP,ASF
{
DllCall("AudioGenie3\WMADeletePictureW",Uint,Updown)
errorcode := DllCall("AudioGenie3\AUDIOSaveChangesW")
}
if(errorcode<>-1)
MsgBox , 16 , Error , Error Occured While Processing Tag `n%error%
else
MsgBox , Album Art Removed Sucessfully
;Refresh Changes
gosub , reload_same_file
return
;####################################################### Save Tag ###########################################
ButtonSave:
Gui,submit ,NoHide
;Save According to the extension type
if FileExtn in MP3,AAC,MPP,TTA
{
; Set Encoding Information = Unicode
DllCall("AudioGenie3\ID3V2SetFormatAndEncodingW", uint, 0,uint,1)
; Save Tag
Trackinfo := DllCall("AudioGenie3\ID3V2SetTextFrameW", uint, 1414677323,wstr,Track)
Titleinfo := DllCall("AudioGenie3\ID3V2SetTextFrameW", uint, 1414091826,wstr,Title)
Artistinfo := DllCall("AudioGenie3\ID3V2SetTextFrameW", uint, 1414546737,wstr,Artist)
Albuminfo := DllCall("AudioGenie3\ID3V2SetTextFrameW", uint, 1413565506,wstr,Album)
Genreinfo := DllCall("AudioGenie3\ID3V2SetTextFrameW", uint, 1413697358,wstr,Genre)
Yearinfo := DllCall("AudioGenie3\ID3V2SetTextFrameW", uint, 1415136594,wstr,Year)
;Get Language and Description of Comment
;Note - there can be multiple Comments frame but with different description.
lang := DllCall("AudioGenie3\ID3V2GetCommentLanguageW", uint, 1,wstr)
Desc := DllCall("AudioGenie3\ID3V2GetCommentDescriptionW", uint, 1,wstr)
Commentinfo := DllCall("AudioGenie3\ID3V2AddCommentW", wstr,lang,wstr,Desc,wstr ,Comments)
;Get Error info (if any)
errorcode := DllCall("AudioGenie3\ID3V2SaveChangesW")
}else {
Artistinfo := DllCall("AudioGenie3\AUDIOSetArtistW", wstr ,Artist)
Albuminfo := DllCall("AudioGenie3\AUDIOSetAlbumW", wstr ,Album)
Yearinfo := DllCall("AudioGenie3\AUDIOSetYearW", wstr ,Year)
Genreinfo := DllCall("AudioGenie3\AUDIOSetGenreW", wstr ,Genre)
Trackinfo := DllCall("AudioGenie3\AUDIOSetTrackW", wstr ,Track)
Titleinfo := DllCall("AudioGenie3\AUDIOSetTitleW", wstr ,Title)
Commentinfo := DllCall("AudioGenie3\AUDIOSetCommentW", wstr ,Comments)
errorcode := DllCall("AudioGenie3\AUDIOSaveChangesW")
}
if(errorcode<>-1)
MsgBox , 16 , Error , Error Occured While Processing Tags `n%error%
else
MsgBox, Tag Applied Sucessfully
;Refresh Changes
gosub , reload_same_file
return
;######################## MULTIPLE COVER NAVIGATION #############################
;Updown Variable Stores Current Position of Cover Art
;Viz implemented as follows
upupn:
UpDown+=2 ;increment by 2
updwn:
UpDown-- ;decrement by 1 => net = 1
if(UpDown<=0) ; if updown is <0
UpDown := 1 ;Revert back to first cover art in the file
else if (UpDown>=Picnum) ;else if updown is greater then total number of covers present in file
UpDown := Picnum ; revert it to actual max. i.e. total no. of covers
;Delete prev cover art (Say cover 1)
FileDelete , %A_Temp%\AlbumArt.png
FileDelete , %A_Temp%\AlbumArt.jpg
;Get Next Picture Info (Say cover 2)
;According to supported tag type
Mime := DllCall("AudioGenie3\MP4GetPictureMimeW",uint, Updown,wstr)
IfInString , Mime , jpg
DllCall("AudioGenie3\MP4GetPictureFileW", wstr , A_Temp "\AlbumArt.jpg", uint, Updown)
else
DllCall("AudioGenie3\MP4GetPictureFileW", wstr , A_Temp "\AlbumArt.png", uint, Updown)
Mime := DllCall("AudioGenie3\FLACGetPictureMimeW",uint, Updown,wstr)
IfInString , Mime, jpeg
DllCall("AudioGenie3\FLACGetPictureFileW", wstr , A_Temp "\AlbumArt.jpg", uint, Updown)
else
DllCall("AudioGenie3\FLACGetPictureFileW", wstr , A_Temp "\AlbumArt.png", uint, Updown)
Mime := DllCall("AudioGenie3\ID3V2GetPictureMimeW",uint, Updown,wstr)
IfInString , Mime, jpeg
DllCall("AudioGenie3\ID3V2GetPictureFileW", wstr , A_Temp "\AlbumArt.jpg", uint, Updown)
else
DllCall("AudioGenie3\ID3V2GetPictureFileW", wstr , A_Temp "\AlbumArt.png", uint, Updown)
Mime := DllCall("AudioGenie3\WMAGetPictureMimeW",uint, Updown,wstr)
if(Mime = jpg)
DllCall("AudioGenie3\WMAGetPictureFileW", wstr , A_Temp "\AlbumArt.jpg", uint, Updown)
else (Mime = png)
DllCall("AudioGenie3\WMAGetPictureFileW", wstr , A_Temp "\AlbumArt.png", uint, Updown)
; Get Cover type i.e. - front , back etc.
covertypeinfo:= DllCall("AudioGenie3\ID3V2GetPictureTypeTextW", uint, Updown,wstr)
;Get its size (in Bytes)
coverSize:= DllCall("AudioGenie3\ID3V2GetPictureSizeW", uint, Updown)
;if nothing found then check for other types
if covertypeinfo=
{
Covertypeinfo:= DllCall("AudioGenie3\FLACGetPictureTypeTextW",uint ,Updown,wstr)
coverSize:= DllCall("AudioGenie3\FLACGetPictureSizeW", uint, Updown)
if covertypeinfo=
{
Covertypeinfo= No Description
coverSize:= DllCall("AudioGenie3\MP4GetPictureSizeW", uint, Updown)
if coverSize=
{
coverSize:= DllCall("AudioGenie3\WMAGetPictureSizeW", uint, Updown)
}
}
}
;Now change the cover Art on the Gui
IfExist , %A_Temp%\AlbumArt.png ; Check if PNG
GuiControl,, Alb_art, *w90 *h90 %A_Temp%\AlbumArt.png
IfNotExist , %A_Temp%\AlbumArt.png ;If not PNG
{
IfExist , %A_Temp%\AlbumArt.jpg ;Check JPG
GuiControl,, Alb_art, *w90 *h90 %A_Temp%\AlbumArt.jpg
else ;If not JPG then Set Empty
GuiControl,, Alb_art, *w90 *h90 empty.png
}
GuiControl, , covertype,%Updown%/%Picnum% %Covertypeinfo% - %coverSize% Bytes
return
;########################## EXIT #################################
GuiClose:
ExitApp
- Attachments
-
- Tag.zip
- (4.11 KiB) Downloaded 219 times
aka Rajat
Re: [ Music Files Tag Editor written in Autohotkey ]
Many thanks Rajat
I only made some adjustments in the position of the image (to center it in the groupbox )and buttons.
I only made some adjustments in the position of the image (to center it in the groupbox )and buttons.
- Attachments
-
- tag_2.zip
- (4.12 KiB) Downloaded 198 times
Re: [ Music Files Tag Editor written in Autohotkey ]
noname wrote:Many thanks Rajat
I only made some adjustments in the position of the image (to center it in the groupbox )and buttons.
aka Rajat
Re: [ Music Files Tag Editor written in Autohotkey ]
Hey rajat, it's great to see you here, but why is your username not rajat?
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
Re: [ Music Files Tag Editor written in Autohotkey ]
Do you Know My Secret -- I am a BATMANjoedf wrote:Hey rajat, it's great to see you here, but why is your username not rajat?
Just Kidding.
It's just a personal Prefrence. Should i change it ?
aka Rajat
Re: [ Music Files Tag Editor written in Autohotkey ]
BATMAM :O YOU HAVE MY UTMOST RESPECT!
haha, if you feel it to be the right choice. I dont mind, you are free to do what you want
if you dont change it, you could put something like "aka rajat" in your signature or something
Regards
haha, if you feel it to be the right choice. I dont mind, you are free to do what you want
if you dont change it, you could put something like "aka rajat" in your signature or something
Regards
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
Re: [ Music Files Tag Editor written in Autohotkey ]
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
Re: [ Music Files Tag Editor written in Autohotkey ]
Final adjustments and visual styling
Re: [ Music Files Tag Editor written in Autohotkey ]
I Should Say -- "This is freaking Awesome"noname wrote:Final adjustments and visual styling
aka Rajat
Re: [ Music Files Tag Editor written in Autohotkey ]
This line:
DllCall(dll . "\AUDIOAnalyzeFileW", Str,A_LoopFileFullPath )
returns 0, which according to the AudioGenie documentation is "unknown format".
Any ideas as to why I am getting that for .mp3 files?
Thanks,
Relayer
DllCall(dll . "\AUDIOAnalyzeFileW", Str,A_LoopFileFullPath )
returns 0, which according to the AudioGenie documentation is "unknown format".
Any ideas as to why I am getting that for .mp3 files?
Thanks,
Relayer
Re: [ Music Files Tag Editor written in Autohotkey ]
Which version of Autohotkey are u using ?
Also , Use
DllCall( A_ScriptDir "\AudioGenie3.dll\AUDIOAnalyzeFileW", Str,filename )
Instead of
DllCall(dll . "\AUDIOAnalyzeFileW", Str,A_LoopFileFullPath )
And, Let me know if Problem Still Persists.
Also --> A COMPLETELY NEW AUDIOGENIE AUDIO WRAPPER IS COMING SOON.WITH SUPPORT OF ADVANCE FEATURES.
Also , Use
DllCall( A_ScriptDir "\AudioGenie3.dll\AUDIOAnalyzeFileW", Str,filename )
Instead of
DllCall(dll . "\AUDIOAnalyzeFileW", Str,A_LoopFileFullPath )
And, Let me know if Problem Still Persists.
Also --> A COMPLETELY NEW AUDIOGENIE AUDIO WRAPPER IS COMING SOON.WITH SUPPORT OF ADVANCE FEATURES.
aka Rajat
Re: [ Music Files Tag Editor written in Autohotkey ]
I'm sorry the variable dll is set to the path and name of the AudioGenie3.dll so my script is already doing what you are saying it should use. I downloaded AudioGenie from SourceForge. I tried both the 64 bit and the 32 bit versions with the same result.
I am using AutoHotkey v1.1.14.04 (AHK_L)
Relayer
I am using AutoHotkey v1.1.14.04 (AHK_L)
Relayer
Re: [ Music Files Tag Editor written in Autohotkey ]
hmmm.
Will u please post the code. I mean complete code so that i can figure out what's wrong.
Also r u using the ANSI Version?
Will u please post the code. I mean complete code so that i can figure out what's wrong.
Also r u using the ANSI Version?
aka Rajat
Re: [ Music Files Tag Editor written in Autohotkey ]
Yes, I am using the ANSI version. Could that be the issue?
Relayer
Relayer
Re: [ Music Files Tag Editor written in Autohotkey ]
Yes it is.
As Audiogenie accepts only UNICODED STRINGS.
Use Following Functions to Convert your Calls into unicode for Audiogenie (Also Check the Example Script).
USAGE
Modify the Above script as per your Variable Setting. And You Should be good to go.
As Audiogenie accepts only UNICODED STRINGS.
Use Following Functions to Convert your Calls into unicode for Audiogenie (Also Check the Example Script).
Code: Select all
ATOU( ByRef Unicode, Ansi ) { ; Ansi to Unicode
VarSetCapacity( Unicode, (Len:=StrLen(Ansi))*2+1, 0 )
Return DllCall( "MultiByteToWideChar", Int,0,Int,0,Str,Ansi,Int,Len, Str,Unicode, Int,Len )
}
UTOA( pUnicode ) { ; Unicode to Ansi
VarSetCapacity( Ansi,(nSz:=DllCall( "lstrlenW", UInt,pUnicode )+1) )
DllCall( "WideCharToMultiByte", Int,0, Int,0, UInt,pUnicode, Int,nSz
, Str,Ansi, Int,nSz+1, Int,0, Int,0 )
Return Ansi
}
Code: Select all
mp3FileA := A_LoopFileFullPath
ATOU(mp3FileU,mp3FileA) ; Convert Your Filename into Unicoded String
DllCall( A_ScriptDir "\AudioGenie3\AUDIOAnalyzeFileW", Str,mp3FileU ) ; Make a dllcall for format checking
Artistinfo := UTOA( DllCall(A_ScriptDir "\AudioGenie3\AUDIOGetArtistW")) ; retrieve the String in Ansi Format.
Albuminfo := UTOA( DllCall(A_ScriptDir "\AudioGenie3\AUDIOGetAlbumW"))
Yearinfo := UTOA( DllCall(A_ScriptDir "\AudioGenie3\AUDIOGetYearW"))
Genreinfo := UTOA( DllCall(A_ScriptDir "\AudioGenie3\AUDIOGetGenreW"))
Trackinfo := UTOA( DllCall(A_ScriptDir "\AudioGenie3\AUDIOGetTrackW"))
Titleinfo := UTOA( DllCall(A_ScriptDir "\AudioGenie3\AUDIOGetTitleW"))
Commentinfo := UTOA( DllCall(A_ScriptDir "\AudioGenie3\AUDIOGetCommentW"))
Composerinfo := UTOA( DllCall(A_ScriptDir "\AudioGenie3\AUDIOGetComposerW"))
aka Rajat
Re: [ Music Files Tag Editor written in Autohotkey ]
OK,
Your suggestions worked if I changed your script to not use the ID3V2 set of functions to read the tags. Your original script had MP3 being processed with the ID3V2 instead of AUDIO. Which one is right for MP3 files?
Now I'm having issues writing modified tags back to the file. I see you again use the ID3V2 functions for MP3. Should I switch to AUDIO again? Do I need to ATOU each tag before calling the DLL to write the tag?
Relayer
Your suggestions worked if I changed your script to not use the ID3V2 set of functions to read the tags. Your original script had MP3 being processed with the ID3V2 instead of AUDIO. Which one is right for MP3 files?
Now I'm having issues writing modified tags back to the file. I see you again use the ID3V2 functions for MP3. Should I switch to AUDIO again? Do I need to ATOU each tag before calling the DLL to write the tag?
Relayer
Return to “Scripts and Functions (v1)”
Who is online
Users browsing this forum: Chunjee and 145 guests