Results 1 to 2 of 2

Thread: What's wrong with this code?

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2001
    Location
    Maumelle, AR
    Posts
    624

    Question What's wrong with this code?

    Ok, this code loops through a filelistbox splitting up filenames such as "Superdrag - Ambulance Driver" . Then it takes the two parts of the array an writes them to the ID3 v1 tag in the corresponding fields. But for some reason it's not working. Any help with this is extremely appreciated as the use of this program will save me MANY hours of work!
    VB Code:
    1. Private Sub Command1_Click()
    2.  
    3. lbltotal.Caption = File1.ListCount
    4.  
    5. For x = 0 To File1.ListCount - 1
    6.     lblcurrent = File1.ListIndex
    7.    
    8.     Filename = Dir1.Path & "\" & File1.List(x)
    9.    
    10.     arraystrings = Split(Filename, " - ")
    11.  
    12.     tag = "TAG"
    13.     songname = arraystrings(1)
    14.     artist = arraystrings(0)
    15.    
    16.    
    17.     Open Filename For Binary Access Write As #1
    18.     Seek #1, FileLen(Filename) - 127
    19.     Put #1, , tag
    20.     Put #1, , songname
    21.     Put #1, , artist
    22.     Close #1
    23. Next

  2. #2
    Fanatic Member Slaine's Avatar
    Join Date
    Jul 2002
    Posts
    641
    In what way is it not working?

    I have just tested it and it seems to be working fine.
    Martin J Wallace (Slaine)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width