Custom Report 3.2 - Updated 29/07/2014

Download and get help for different MediaMonkey for Windows 4 Addons.

Moderators: Peke, Gurus

trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

I've corrected my previous post - I used the wrong quote marks! :oops:
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

New version (1.3) is now available from my website. Changes include...

- Added option to generate report for all playlists
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
Guest

Post by Guest »

Hi Trixmoto:

I've been playing with the new Custom report and I have a few questions/updates, I was wondering if you could help me (again).

I've created a report of my playlists using the new feature you've added and I was wondering if it is possible to have a blank line appear between each playlist? I tried to put a blank line in the report requirements but it just ran them all together when they were exported to Excel. Very confusing to separate and read 94 playlists.

The second request is, is there a field in the report that would extract the total number of songs in each playlist? In other words, I would only like the report to extract the name of the playlist and the number of songs which are in the playlist, it would be similar to the statistics report?? This would be a nice feature because I use this list to compare to my player to determine if any of the playlists are missing songs.

Thanks again,

Nyn
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

Well you could do this by replacing lines 371-389...

Code: Select all

      Select Case DropDown1.ItemIndex
        Case 0 'CSV
          If Not Unicode Then
            name = SDB.ToAscii(name)
          End If
          Call f.WriteLine(name)
        Case 1 'HTML
          Call f.WriteLine("<tr><td colspan=99><b>"&MapXML(name,False)&"</b></td></tr>")
        Case 2 'XLS
          y = y+1
          ws.Cells(y,1).Value = name
        Case 3 'XML
          Call f.WriteLine("<Playlist title='"&MapXML(name,True)&"'>")
        Case 4 'TXT
          If Not Unicode Then
            name = SDB.ToAscii(name)
          End If      
          Call f.WriteLine(name)
      End Select 
...with...

Code: Select all

See below
Last edited by trixmoto on Mon Oct 22, 2007 5:51 pm, edited 2 times in total.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Post by nynaevelan »

Trixmoto:

When I try to run the report using only the playlists I get the following error:

Error #438 - Microsoft VBScript runtime error
Object doesn't support this propety or method: 'Tracks'
File: "c:\program files\mediamonkey3\scripts\customreport.vbs", line: 381, Column 10

The script runs when I use selected tracks but I do not see any differences from what you had it doing before.

Nyn
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

Sorry, my fault. Should be "list.Count" not "list.Tracks.Count" - I've corrected my previous post so recopying the code should provide the output you're after.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Post by nynaevelan »

Trixmoto:

Once again you have made my job easier, if you keep this up I am going to have to put you on the payroll. A little side note, I recieved an error when I copied the code, but when I removed the last line all was well.

Nyn
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

Sorry, my fault for trying to code ad-hoc with testing!! Try this if you want to include the blank line you were after...

Code: Select all

      Select Case DropDown1.ItemIndex
        Case 0 'CSV
          If Not Unicode Then
            name = SDB.ToAscii(name)
          End If
          Call f.WriteLine(name&" ("&list.Count&")")
          Call f.WriteLine("")
        Case 1 'HTML
          Call f.WriteLine("<tr><td colspan=99><b>"&MapXML(name&" ("&list.Count&")",False)&"</b></td></tr>")
          Call f.WriteLine("<tr><td colspan=99></td></tr>")
        Case 2 'XLS
          y = y+1
          ws.Cells(y,1).Value = name&" ("&list.Count&")"
          y = y+1
        Case 3 'XML
          Call f.WriteLine("<Playlist title='"&MapXML(name&" ("&list.Tracks.Count&")",True)&"'>")
        Case 4 'TXT
          If Not Unicode Then
            name = SDB.ToAscii(name)
          End If      
          Call f.WriteLine(name&" ("&list.Count&")")
          Call f.WriteLine("")
      End Select
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Post by nynaevelan »

Now I get the following error:

Error #70 - Microsoft VBScript runtime error
Permission Denied
File: "c:\program files\mediamonkey3\scripts\customreport.vbs", line: 338, Column 8

You don't have to put too much trouble into in, now that you added the total number of songs in each playlist in parenthesis, I can scan the file looking for those.

Nyn
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

I think I might give up for now then. I'm not on the right machine to test it today! :)
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Post by nynaevelan »

You know I must have either copied something wrong on my home computer or there is something else going on there, because it works here on my work computer. Of course here I am running XP and at home I am running Vista. So I am going to try this version of the vbs file at home. If it works all is well, if it doesn't I have to do some research to find out what is preventing it from working.

Nyn

EDIT: Ok tried the file on my Vista machine and it did not work. After scouring the internet to try to find out what was the difference between the Vista and XP machines, I realized the problem was I had the file open that I was telling the report to export to. SORRY for my **stupidity**, consider this one a done deal. :oops:
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files
webjogi73
Posts: 56
Joined: Sun Mar 18, 2007 7:10 am

Post by webjogi73 »

Thanks for this great sricpt. Its working well.

However there is one thing I am missing. What about a format-option for CD-Covers ? I mean. having this great Track list in my hand I would really love it to print out in the right format fpr CD-Jewels.

Is there a chance to do so ?

Thanks
gutgehn,

webjogi73
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

I guess this could be done using absolute position in html, but it wouldn't be applicable to the other file formats I don't think. I might take a look at doing it. Really it's another application and there was one being produced here but it appears the main developer has no time to continue the project, unfortunately.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
nojac
Posts: 517
Joined: Tue Dec 19, 2006 12:23 pm
Location: Norway

Post by nojac »

Thank you for another very nice script.

I hope you will add Custom4 and Custom5 to the list of selectable fields in your next version.

Here on the Forum it is correctly called a MM2+3 script, but on your home page I can only see the MM2 monkey.
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

I do plan to add all the extra MM3 fields once the property values have been released, I don't know if they are accessible through scripting yet. An MM3 installation package is on my to do list but I've not got round to it yet, sorry! :)
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
Post Reply