AutoHotkey Community

It is currently May 27th, 2012, 6:18 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 14 posts ] 
Author Message
 Post subject: COM Experts plz Help me
PostPosted: November 24th, 2010, 8:21 am 
Offline

Joined: January 5th, 2007, 2:18 pm
Posts: 33
Hi Guys,

i write this Code from this Topic

but it is working only for 1 file. when the loop starts second time its giving me Error of (The COM Object may not be a valid Dispatch Object!)
please check the code and make correction.

Code:
#NoTrayIcon
#Include %A_ScriptDir%\Com.ahk
Gui, Add, GroupBox, x6 y10 w390 h150 , Writing Tags
Gui, Add, Text, x16 y30 w30 h20 , Path:
Gui, Add, Edit, x46 y30 w270 h20 vPath1,
Gui, Add, Button, x316 y30 w70 h20 gSelectFolder1, Browse...
Gui, Add, Text, x16 y60 w30 h20 , Artist:
Gui, Add, Edit, x46 y60 w70 h20 vArtist,
Gui, Add, Text, x126 y60 w40 h20 , Album:
Gui, Add, Edit, x166 y60 w70 h20 vAlbum
Gui, Add, Text, x246 y60 w50 h20 , Copyright:
Gui, Add, Edit, x296 y60 w90 h20 vCopyright
Gui, Add, Text, x16 y90 w30 h20 , Title:
Gui, Add, Edit, x46 y90 w70 h20 vTitle
Gui, Add, Text, x126 y90 w60 h20 , Comments:
Gui, Add, Edit, x186 y90 w80 h20 vComments
Gui, Add, Text, x276 y90 w30 h20 , Label:
Gui, Add, Edit, x306 y90 w80 h20 vLabel
Gui, Add, Button, x146 y120 w100 h30 gOKWrite, OK

Gui, Add, GroupBox, x6 y170 w390 h90 , Reading Tags
Gui, Add, Text, x16 y190 w60 h20 , Select File:
Gui, Add, Edit, x76 y190 w240 h20 vPath2,
Gui, Add, Button, x316 y190 w70 h20 gSelectFolder2, Browse...
Gui, Add, Button, x146 y220 w100 h30 gOKRead, OK

Gui, Add, GroupBox, x6 y270 w390 h90 , Clear Tags:
Gui, Add, Text, x16 y290 w70 h20 , Select Folder:
Gui, Add, Edit, x86 y290 w230 h20 vPath3,
Gui, Add, Button, x316 y290 w70 h20 gSelectFolder3, Browse...
Gui, Add, Button, x146 y320 w100 h30 gOKClear, OK

; Generated using SmartGUI Creator 4.0
Gui, Show, w404 h367, Wow Tagger v1.0
COM_Init()
Return

GuiClose:
ExitApp

SelectFolder1:
FileSelectFolder, Folder1, , 3
If Folder1 =
   MsgBox, You didn't select a folder.
Else
   GuiControl,, Path1, %Folder1%
Return

OKWrite:
Gui Submit, Nohide
If Path1 =
{
   MsgBox, 16, Error, Please select a folder first for Tag writing.
   Return
}
Loop, %Path1%\*.mp3
{
   Name1=
   Dir1=
   WritePath=
   TrackNo=
   Title=%Name1%
   TrackNo=%A_Index%

   WritePath = %A_LoopFileLongPath%
   SplitPath, WritePath,Name1, Dir1

   
   Gosub, Write
}
MsgBox, 0, Done, Operation completed successfully
Return

SelectFolder2:
FileSelectFolder, Folder2, , 3
If Folder2 =
    MsgBox, You didn't select a folder.
Else
   GuiControl,, Path2, %Folder2%
Return


OKRead:
Gui, Submit, NoHide
If Path2 =
{
   MsgBox, 16, Error, Please select a folder first for Tag Reading.
   Return
}
Loop, %Path2%\*.mp3
{
   ;Ex. 3:
   ;For this example, Artist=A, Title=T, Year=Y,Album=AL,Genre=G
   Name2=
   Dir2=
   FullFileName = %A_LoopFileLongPath%
   SplitPath, FullFileName,Name2, Dir2
   ID := ID3_Open(Dir2 . "\" . Name2) ;Open "Song.mp3" for reading/editing

   MsgBox % ID3_Read(ID) ;will show T/A/AL/Y/G
   MsgBox % ID3_Read(ID,"Artist&Genre&Year","&") ;will show A&G&Y
   ID3_Close(ID) ;no need to save, since no editing was done
}
MsgBox, 0, Done, Operation completed successfully
Return


SelectFolder3:
FileSelectFolder, Folder3, , 3
If Folder3 =
   MsgBox, You didn't select a folder.
Else
   GuiControl,, Path3, %Folder3%
Return

OKClear:
Gui, Submit, NoHide
If Path3 =
{
   MsgBox, 16, Error, Please select a folder first for Clear Tags.
   Return
}
Loop, %Path3%\*.mp3
{

   FullFileName = %A_LoopFileLongPath%
   SplitPath, FullFileName,Name3, dir3

   ID := ID3_Open(Dir3 . "\" . Name3)

   ID3_Write(ID) ;clears all tags
   ID3_Save(ID,Dir3 . "\" . Name3)
}
MsgBox, 0, Done, Operation completed successfully `nall Tags are Clear now
Return



Write:

COM_Init()
; Ex. 1:
ID=
ID := ID3_Open(Dir1 . "\" . Name1) ;Open "Song.mp3" for reading/editing

ID3_Write(ID,"Artist",Artist) ;write MyArtist to Artist tag
ID3_Write(ID,"LeadArtist",Artist) ;same as above
   ;;ID3_Write(ID,"Movie","MyMovie") ;write MyMovie to Movie tag
   ;;ID3_Write(ID,"Year","MyYear") ;write MyYear to Year tag
ID3_Write(ID,"Album",Album) ;write MyAlbum to Album tag
ID3_Write(ID,"CopyrightHolder",Copyright) ;...you get the point
ID3_Write(ID,"Title",Title)
   ;;ID3_Write(ID,"Genre","MyGenre")
ID3_Write(ID,"Comments",Comments)
   ;;ID3_Write(ID,"CopyrightYear","MyCopyrightYear")
   ;;ID3_Write(ID,"BeatsPerMinute","MyBeatsPerMinute")
   ;;ID3_Write(ID,"ISRC","MyISRC")
ID3_Write(ID,"Label",Label)
   ;;ID3_Write(ID,"PartOfSet","MyPartOfSet")
ID3_Write(ID,"TrackPosition",TrackNo)
ID3_Write(ID,"Track#",TrackNo)  ;same as above
ID3_Write(ID,"TrackNum",TrackNo)  ;same as above
ID3_Write(ID,"TrackNumber",TrackNo)   ;same as above
   ;;ID3_Write(ID,"FileID","MyFileID")
ID3_Save(ID,Dir1 . "\" . Name1)
Return




;ID3_Open(FileName) : opens %FileName% for reading/editing
ID3_Open(FileName) {
  If !(FileExist(FileName))
    Return 0
  tag := COM_CreateObject("CDDBControlAOL.CddbID3Tag")
  COM_Invoke(tag,"LoadFromFile",FileName,0)
  Return tag
}

;ID_Write(FileID, [Tag , NewInfo ] ) : Writes to the Tag
;FileID is the return from ID3_Open
;Tag should be :  Artist,Track#,TrackNum,TrackNumber,LeadArtist,Title,Album,Genre,Year,Comments,CopyrightYear,CopyrightHolder
;,Label,BeatsPerMinute,PartOfSet,TrackPosition,FileID,ISRC, or Movie
;NewInfo is the information to write into the ID3 Tag specified
;Leave Tag and NewInfo blank to clear all tags.
ID3_Write(FileID,Tag="",NewInfo="") {
  If !FileID
    Return 0
  Tag := RegExReplace(Tag,"i)(?<!Lead)(Artist)","LeadArtist")
  Tag := RegExReplace(Tag,"i)TrackNum|Track#|TrackNumber","TrackPosition")
  AllowedList:="LeadArtist,Title,Album,Genre,Year,Comments,CopyrightYear,CopyrightHolder,Label,BeatsPerMinute,PartOfSet,TrackPosition,FileID,ISRC,Movie"
  If (!Tag && !NewInfo) {
    Loop, Parse, AllowedList, `,
      COM_Invoke(FileID,A_LoopField,"")
    Return 1
  }
  If Tag not in %AllowedList%
    Return 0
  COM_Invoke(FileID,Tag,NewInfo)
  Return 1
}


;ID3_Read(FileID, [ Tag , Delim ] ) : Reads info from specified tag(s)
;FileID is the return from ID3_Open()
;Tag should be a %Delim% delimited list of the tags that you want read
;See ID3_Write() for a list of allowed Tag names.
;If Tag is blank, will return Title/Artist/Album/Year/Genre
;Returns: %Delim% delimited list of the information
;, in the same order they are in the Tag parameter
ID3_Read(FileID,Tag="",Delim="/") {
  If (!Delim || !FileID)
    Return 0
  If (!Tag)
    Tag := "Title/LeadArtist/Album/Year/Genre", Delim:= "/"
  Tag := RegExReplace(Tag,"i)(?<!Lead)(Artist)","LeadArtist")
  Tag := RegExReplace(Tag,"i)TrackNum|Track#|TrackNumber","TrackPosition")
  AllowedList:="LeadArtist,Title,Album,Genre,Year,Comments,CopyrightYear,CopyrightHolder,Label,BeatsPerMinute,PartOfSet,TrackPosition,FileID,ISRC,Movie"
  Loop, Parse, Tag, %Delim%
    If A_LoopField not in %AllowedList%
      Return 0
    Else
      Info .= (A_Index = 1 ? "" : Delim) COM_Invoke(FileID,A_LoopField)
  Return Info
}

;ID3_Save(FileID, FileName) : Saves changes made to the tags
;FileID is the return from ID3_Open()
;FileName is the file to save the new tags to,
;in most cases the same file used in ID3_Open()
ID3_Save(FileID,FileName) {
  If (!FileID || !FileName)
    Return 0
  COM_Invoke(FileID, "SaveToFile", FileName)
  COM_Release(FileID)
  Return 1
}

;ID3_Close(FileID) : Closes/Releases the file
;FileID is the return from ID3_Open()
;Use this if you do not want to save the changes,
;but are done working with it.
ID3_Close(FileID) {
  If !FileID
    Return 0
  COM_Release(FileID)
  Return 1
}



Please Help Me, i m so confused :?

_________________
Image


Last edited by kaka on December 3rd, 2010, 4:25 am, edited 4 times in total.

Report this post
Top
 Profile  
Reply with quote  
PostPosted: November 25th, 2010, 4:59 am 
Offline

Joined: January 5th, 2007, 2:18 pm
Posts: 33
@Sean
@SKAN

where are u guys? help me... :(

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 25th, 2010, 9:28 am 
Offline
User avatar

Joined: December 26th, 2005, 4:40 pm
Posts: 8776
Unfortunately, I do not have expertise in COM :(

_________________
URLGet - Internet Explorer based Downloader
StartEx - Portable Shortcut Link


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 26th, 2010, 4:25 am 
Offline

Joined: January 5th, 2007, 2:18 pm
Posts: 33
Oops, so bad for me :(
then who will help me guys :?:

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 27th, 2010, 2:56 pm 
i am also looking for this
i like your gui :)
please help us guys


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: November 27th, 2010, 3:15 pm 
I am also working on a Program that tags mp3's using COM and copys them in a Userdefined Sorting into another folder. I'm doing this for a while and its still under development but already usable for MP3 files.

I had a look on your script. its working fine for me, when i select a folder to read the tags, i get multiple MsgBox with Tag Information retrieved from the files.

Suggestions:

Let your Script run in Admin Mode. I Had several Issues using your Script. It just crashes.

Code:
If A_IsAdmin != 1
{
   If A_Iscompiled = 1
   DllCall("shell32\ShellExecuteA", "uint", 0, "str", "RunAs", "str", A_ScriptFullPath, "str", "File" "$&" "Author" "$&" "Url", "str", A_WorkingDir, "int", 1)
      Else
   DllCall("shell32\ShellExecuteA", "uint", 0, "str", "RunAs", "str", A_AhkPath, "str", """" . A_ScriptFullPath . """", "str", A_WorkingDir, "int", 1)
   ExitApp
}


Another Suggestion: Did you register your cddbcontrol.dll on your computer?

Code:
Use: RegSvr32.exe CDDBControl.dll

RunWait, RegSvr32.exe %A_WinDir%\System32\CDDBControl.dll /s


Hope it helps. If you still have issues, pm me.[/quote]


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: November 27th, 2010, 3:16 pm 
Offline

Joined: April 24th, 2009, 7:59 pm
Posts: 3
Okay, just had a problem logging in. Should be fine now. Last post was mine ^^'

Atm i am working on getting FreeDB into my program. Anyone has an idea to implement it? I only have mp3's not whole disc id's...

This line fixes some issues:
Code:
SetWorkingDir %A_ScriptDir%


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 27th, 2010, 3:52 pm 
Offline

Joined: January 5th, 2007, 2:18 pm
Posts: 33
i m already running it as a admin.

and

cddbcontrol.dll is also registered.

Note:this script is working for me only for 1 mp3 file, if i run this for 2 or more files its giving me COM error. :(

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 28th, 2010, 9:22 am 
Offline

Joined: April 19th, 2005, 10:26 am
Posts: 2249
Location: switzerland
sorry, have no answer, just found this
-------------------------------------------------
MP3 Tag Stripper is simply a front end interface to a console program known as "Tag.exe" by Neil Popham.
The front end is setup to simply tell Tag to strip any and all tag information from any mp3 files you have dragged and dropped on the interface.
MP3 Tag Stripper is freeware.
For more information: http://www.paraboliclogic.com/programs/ ... agstripper
Download Windows: http://www.paraboliclogic.com/programs/ ... ripper.zip
For more information about "Tag.exe" the console program my program interfaces with, please visit http://www.synthetic-soul.co.uk/


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 30th, 2010, 6:30 am 
Offline

Joined: January 5th, 2007, 2:18 pm
Posts: 33
No garry, :(
i want to do this with ahk
--------------------------
Guys, where are the COM experts ? :?:
Please Help me

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 1st, 2010, 7:35 am 
Offline

Joined: January 5th, 2007, 2:18 pm
Posts: 33
Still Waiting ... :?

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 1st, 2010, 7:34 pm 
Offline

Joined: April 24th, 2009, 7:59 pm
Posts: 3
try this one:

Code:
#NoTrayIcon
SetWorkingDir %A_ScriptDir%
#Include Com.ahk
Gui, Add, GroupBox, x6 y10 w390 h150 , Writing Tags
Gui, Add, Text, x16 y30 w30 h20 , Path:
Gui, Add, Edit, x46 y30 w270 h20 vPath1,
Gui, Add, Button, x316 y30 w70 h20 gSelectFolder1, Browse...
Gui, Add, Text, x16 y60 w30 h20 , Artist:
Gui, Add, Edit, x46 y60 w70 h20 vArtist,
Gui, Add, Text, x126 y60 w40 h20 , Album:
Gui, Add, Edit, x166 y60 w70 h20 vAlbum
Gui, Add, Text, x246 y60 w50 h20 , Copyright:
Gui, Add, Edit, x296 y60 w90 h20 vCopyright
Gui, Add, Text, x16 y90 w30 h20 , Title:
Gui, Add, Edit, x46 y90 w70 h20 vTitle
Gui, Add, Text, x126 y90 w60 h20 , Comments:
Gui, Add, Edit, x186 y90 w80 h20 vComments
Gui, Add, Text, x276 y90 w30 h20 , Label:
Gui, Add, Edit, x306 y90 w80 h20 vLabel
Gui, Add, Button, x146 y120 w100 h30 gOKWrite, OK

Gui, Add, GroupBox, x6 y170 w390 h90 , Reading Tags
Gui, Add, Text, x16 y190 w60 h20 , Select File:
Gui, Add, Edit, x76 y190 w240 h20 vPath2,
Gui, Add, Button, x316 y190 w70 h20 gSelectFolder2, Browse...
Gui, Add, Button, x146 y220 w100 h30 gOKRead, OK

Gui, Add, GroupBox, x6 y270 w390 h90 , Clear Tags:
Gui, Add, Text, x16 y290 w70 h20 , Select Folder:
Gui, Add, Edit, x86 y290 w230 h20 vPath3,
Gui, Add, Button, x316 y290 w70 h20 gSelectFolder3, Browse...
Gui, Add, Button, x146 y320 w100 h30 gOKClear, OK

; Generated using SmartGUI Creator 4.0
Gui, Show, w404 h367, Wow Tagger v1.0
COM_Init()
ListLines
Return

GuiClose:
ExitApp

SelectFolder1:
FileSelectFolder, Folder1, , 3
If Folder1 =
   MsgBox, You didn't select a folder.
Else
   GuiControl,, Path1, %Folder1%
Return

OKWrite:
Gui Submit, Nohide
If Path1 =
{
   MsgBox, 16, Error, Please select a folder first for Tag writing.
   Return
}
Loop, %Path1%\*.mp3
{
   Sleep, 500
   Name1=
   Dir1=
   WritePath=
   TrackNo=
   Title=%Name1%
   TrackNo=%A_Index%

   WritePath = %A_LoopFileLongPath%
   SplitPath, WritePath,Name1, Dir1

   
   Gosub, Write
}
MsgBox, 0, Done, Operation completed successfully
Return

SelectFolder2:
FileSelectFolder, Folder2, , 3
If Folder2 =
    MsgBox, You didn't select a folder.
Else
   GuiControl,, Path2, %Folder2%
Return


OKRead:
Gui, Submit, NoHide
If Path2 =
{
   MsgBox, 16, Error, Please select a folder first for Tag Reading.
   Return
}
Loop, %Path2%\*.mp3
{
   ;Ex. 3:
   ;For this example, Artist=A, Title=T, Year=Y,Album=AL,Genre=G
   Sleep, 500
   Name2=
   Dir2=
   FullFileName = %A_LoopFileLongPath%
   SplitPath, FullFileName,Name2, Dir2
   ID := ID3_Open(Dir2 . "\" . Name2) ;Open "Song.mp3" for reading/editing

   MsgBox % ID3_Read(ID) ;will show T/A/AL/Y/G
   MsgBox % ID3_Read(ID,"Artist&Genre&Year","&") ;will show A&G&Y
   ID3_Close(ID) ;no need to save, since no editing was done
}
MsgBox, 0, Done, Operation completed successfully
Return


SelectFolder3:
FileSelectFolder, Folder3, , 3
If Folder3 =
   MsgBox, You didn't select a folder.
Else
   GuiControl,, Path3, %Folder3%
Return

OKClear:
Gui, Submit, NoHide
If Path3 =
{
   MsgBox, 16, Error, Please select a folder first for Clear Tags.
   Return
}
Loop, %Path3%\*.mp3
{
   Sleep, 500
   FullFileName = %A_LoopFileLongPath%
   SplitPath, FullFileName,Name3, dir3

   ID := ID3_Open(Dir3 . "\" . Name3)

   ID3_Write(ID) ;clears all tags
   ID3_Save(ID,Dir3 . "\" . Name3)
}
MsgBox, 0, Done, Operation completed successfully `nall Tags are Clear now
Return



Write:
; Ex. 1:
ID=
ID := ID3_Open(Dir1 . "\" . Name1) ;Open "Song.mp3" for reading/editing

ID3_Write(ID,"Artist",Artist) ;write MyArtist to Artist tag
;~ ID3_Write(ID,"LeadArtist",Artist) ;same as above
   ;;ID3_Write(ID,"Movie","MyMovie") ;write MyMovie to Movie tag
   ;;ID3_Write(ID,"Year","MyYear") ;write MyYear to Year tag
ID3_Write(ID,"Album",Album) ;write MyAlbum to Album tag
ID3_Write(ID,"CopyrightHolder",Copyright) ;...you get the point
ID3_Write(ID,"Title",Title)
   ;;ID3_Write(ID,"Genre","MyGenre")
ID3_Write(ID,"Comments",Comments)
   ;;ID3_Write(ID,"CopyrightYear","MyCopyrightYear")
   ;;ID3_Write(ID,"BeatsPerMinute","MyBeatsPerMinute")
   ;;ID3_Write(ID,"ISRC","MyISRC")
ID3_Write(ID,"Label",Label)
   ;;ID3_Write(ID,"PartOfSet","MyPartOfSet")
ID3_Write(ID,"TrackPosition",TrackNo)
;~ ID3_Write(ID,"Track#",TrackNo)  ;same as above
;~ ID3_Write(ID,"TrackNum",TrackNo)  ;same as above
;~ ID3_Write(ID,"TrackNumber",TrackNo)   ;same as above
   ;;ID3_Write(ID,"FileID","MyFileID")
ID3_Save(ID,Dir1 . "\" . Name1)
Return



;ID3_Open(FileName) : opens %FileName% for reading/editing
ID3_Open(FileName) {
  If !(FileExist(FileName))
    Return 0
  tag := COM_CreateObject("CDDBControlAOL.CddbID3Tag")
  COM_Invoke(tag,"LoadFromFile",FileName,0)
  Return tag
}

;ID_Write(FileID, [Tag , NewInfo ] ) : Writes to the Tag
;FileID is the return from ID3_Open
;Tag should be :  Artist,Track#,TrackNum,TrackNumber,LeadArtist,Title,Album,Genre,Year,Comments,CopyrightYear,CopyrightHolder
;,Label,BeatsPerMinute,PartOfSet,TrackPosition,FileID,ISRC, or Movie
;NewInfo is the information to write into the ID3 Tag specified
;Leave Tag and NewInfo blank to clear all tags.
ID3_Write(FileID,Tag="",NewInfo="") {
  If !FileID
    Return 0
  Tag := RegExReplace(Tag,"i)(?<!Lead)(Artist)","LeadArtist")
  Tag := RegExReplace(Tag,"i)TrackNum|Track#|TrackNumber","TrackPosition")
  AllowedList:="LeadArtist,Title,Album,Genre,Year,Comments,CopyrightYear,CopyrightHolder,Label,BeatsPerMinute,PartOfSet,TrackPosition,FileID,ISRC,Movie"
  If (!Tag && !NewInfo) {
    Loop, Parse, AllowedList, `,
      COM_Invoke(FileID,A_LoopField,"")
    Return 1
  }
  If Tag not in %AllowedList%
    Return 0
  COM_Invoke(FileID,Tag,NewInfo)
  Return 1
}


;ID3_Read(FileID, [ Tag , Delim ] ) : Reads info from specified tag(s)
;FileID is the return from ID3_Open()
;Tag should be a %Delim% delimited list of the tags that you want read
;See ID3_Write() for a list of allowed Tag names.
;If Tag is blank, will return Title/Artist/Album/Year/Genre
;Returns: %Delim% delimited list of the information
;, in the same order they are in the Tag parameter
ID3_Read(FileID,Tag="",Delim="/") {
  If (!Delim || !FileID)
    Return 0
  If (!Tag)
    Tag := "Title/LeadArtist/Album/Year/Genre", Delim:= "/"
  Tag := RegExReplace(Tag,"i)(?<!Lead)(Artist)","LeadArtist")
  Tag := RegExReplace(Tag,"i)TrackNum|Track#|TrackNumber","TrackPosition")
  AllowedList:="LeadArtist,Title,Album,Genre,Year,Comments,CopyrightYear,CopyrightHolder,Label,BeatsPerMinute,PartOfSet,TrackPosition,FileID,ISRC,Movie"
  Loop, Parse, Tag, %Delim%
    If A_LoopField not in %AllowedList%
      Return 0
    Else
      Info .= (A_Index = 1 ? "" : Delim) COM_Invoke(FileID,A_LoopField)
  Return Info
}

;ID3_Save(FileID, FileName) : Saves changes made to the tags
;FileID is the return from ID3_Open()
;FileName is the file to save the new tags to,
;in most cases the same file used in ID3_Open()
ID3_Save(FileID,FileName) {
  If (!FileID || !FileName)
    Return 0
  COM_Invoke(FileID, "SaveToFile", FileName)
  COM_Release(FileID)
  Return 1
}

;ID3_Close(FileID) : Closes/Releases the file
;FileID is the return from ID3_Open()
;Use this if you do not want to save the changes,
;but are done working with it.
ID3_Close(FileID) {
  If !FileID
    Return 0
  COM_Release(FileID)
  Return 1
}


addes some sleep and changed your script a little bit.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 2nd, 2010, 8:21 am 
Offline

Joined: January 5th, 2007, 2:18 pm
Posts: 33
Thanks for helping me

but there is a problem, i give 23 MP3 Files to this but its giving me this error (Same Problem :( )

Code:
Function Name:   "LoadFromFile"
ERROR:   The COM Object may not be a valid Dispatch Object!
   First ensure that COM Library has been initialized through COM_Init().
   ()

Will Continue?

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 3rd, 2010, 2:23 pm 
Offline

Joined: January 5th, 2007, 2:18 pm
Posts: 33
Help me :(

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], hd0202 and 50 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group