LibraryPanes: Library panes like these in Winamp, iRiver, ..

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

Moderators: Peke, Gurus

Diabolic-Destiny
Posts: 223
Joined: Sun Apr 29, 2007 9:45 pm

Post by Diabolic-Destiny »

Awsome!!
Image
Image
Guest

Post by Guest »

After installing the ActiveX control panel, I still receive the same error. Maybe it has to do with my security settings? Monkeyrok, another script that uses activex, seems to run perfectly and has so for the past couple of weeks. Anyways, I think I'll be able to live without it until more stable releases of 3.0 come out. Thanks for you help! :)
Steegy wrote:Then maybe the error is caused because you have an old version of the ActiveX control installed.
It's probably also said in the automatic mail you got, how to download the necessary file (ActiveX control) e.g. from Microsoft's site. Try to update your current version with the newest version. You can also get the necessary file (Microsoft Windows Common Controls 5.0 (SP2)) from here: http://www.mediamonkey.com/wiki/index.p ... t_Controls
This is just a guess. Please ask if it isn't clear, then I'll explain better.
Eyal
Posts: 3118
Joined: Sun Jun 26, 2005 9:27 am
Location: Québec
Contact:

LibraryPanes.vbs

Post by Eyal »

Wow! :o
Fantastic. And it's so fast...

Great script.
Skins for MediaMonkey: Cafe, Carbon, Helium, Spotify, Zekton. [ Wiki Zone ].
El Cabrito
Posts: 13
Joined: Mon Apr 23, 2007 7:07 pm

problem w/ cab file install

Post by El Cabrito »

can't seem to get this to work on my laptop. works on my desktop though. anyway, got the email regarding line 192:

Download and run the following file:

http://home.scarlet.be/ruben.castelein/ ... icense.reg

(after you acknowledge, it will import a registry setting and give a confirmation)

If that doesn't work (if you don't get a "registry setting imported" confirmation), then run "regedit" (without the quotes) and drag&drop the "COMCTL_License.reg" file into it. You'd certainly get a confirmation now.



Then restart MediaMonkey to see if the script now works correctly.



If that alone doesn't fix your problem, then check this:

- you need a file C:\Windows\System32\comctl32.ocx (installed by default, but can be downloaded separately from the internet: http://activex.microsoft.com/controls/vb6/comctl32.cab)

- this file needs to be registered: run "regsvr32 comctl32.ocx" (without the quotes)

but can't figure out how to register the cab file. it contains a .ini and a .ocx file. when i try to run.. regsvr32 comctl32.ocx it doesn't know where the dll is. any ideas? i saved the cab file to my desktop, is there somewhere else i should have put it?
El Cabrito
Posts: 13
Joined: Mon Apr 23, 2007 7:07 pm

solved

Post by El Cabrito »

for anyone having the same problem i was having in the last post, the fix is pretty simple. download the comctl32.cab from the link and save it wherever. open it and extract the two files *.inf and *.ocx to the window/system folder. then run -> regsvr32 comctl32

should be good.

only need that if you are missing the comctl32 activeX files
Deadman36g
Posts: 56
Joined: Tue Jun 12, 2007 11:32 pm
Contact:

Post by Deadman36g »

theta_wave wrote:Hi, I'm still receiving that line 192 error after using the hotfixes from the email. I'm using v2.55.998. Here's the screenshot of the error..

Image
, was you ever able to stop this error?, as I am getting the same thing now.
Steegy
Posts: 3452
Joined: Sat Nov 05, 2005 7:17 pm

Post by Steegy »

Don't the posts above yours explain that?
Anyway, with this feature present in MM3, I'm not developing this script anymore (anyone else can continue, of course). I was working on a new version but never finished it.
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).
Guest

Re: solved

Post by Guest »

El Cabrito wrote:for anyone having the same problem i was having in the last post, the fix is pretty simple. download the comctl32.cab from the link and save it wherever. open it and extract the two files *.inf and *.ocx to the window/system folder. then run -> regsvr32 comctl32

should be good.

only need that if you are missing the comctl32 activeX files
Guest

Re: solved

Post by Guest »

El Cabrito wrote:for anyone having the same problem i was having in the last post, the fix is pretty simple. download the comctl32.cab from the link and save it wherever. open it and extract the two files *.inf and *.ocx to the window/system folder. then run -> regsvr32 comctl32

should be good.

only need that if you are missing the comctl32 activeX files
This fixed my problem. Thank you.
werdna
Posts: 6
Joined: Mon Jul 09, 2007 9:19 am

Post by werdna »

I've modified the script to show only one pane with 4 columns: Artist - Album - # Songs - Last Played
Image

Code: Select all

'***************************************************** 
'****             GLOBAL DECLARATIONS             **** 
'***************************************************** 

Option Explicit 

'Dim LV : Set LV = CreateObject("COMCTL.ListViewCtrl")    'Only necessary for help functions 


Const ForegroundColor = &H000000 
Const BackgroundColor = &HEFEFEF 


Dim TreeNode, ViewMenuItem, Panel 
Dim lvAlbums 

Dim PreviousAlbumsItem 
Dim LastSelection 


' ListView Constants 
Const lvwReport = 3        'Show listview in "Report" view 
Const lvwAutomatic = 0     'Only allow Automatic editing of labels (don't allow manual editing) 


' Alignment constants (alignment of the control in its parent control) 
Const alNone = 0    'No alignment is applied 
Const alTop = 1     'Control is aligned to the top 
Const alBottom = 2    'Control is aligned to the bottom 
Const alLeft = 3    'Control is aligned to the left 
Const alRight = 4    'Control is aligned to the right 
Const alClient = 5    'Control completely covers its parent 


' Anchors constants (control to which borders of the parent control the control is sticked) 
Const akLeft = 1     'Distance from the left border of the parent is constant 
Const akTop = 2       'Distance from the top border of the parent is constant 
Const akRight = 4    'Distance from the right border of the parent is constant 
Const akBottom = 8    'Distance from the bottom border of the parent is constant 


'***************************************************** 
'****                 ENTRY POINT                 **** 
'***************************************************** 

Sub OnStartup 

    Set PreviousAlbumsItem = Nothing 
    LastSelection = " " 

   Call Initialise_LicenseFix 
   Call Initialise_TreeNode 
   Call Initialise_Panel    'Create the Panel before creating the ViewMenuItem (the ViewMenuItem Checked state depends on the Panel's Visible state) 
   Call Initialise_ViewMenuItem 
   Call Initialise_lvAlbums 


   Call OnPanelResize(Panel) 
   If SDB.IniFile.StringValue("AlbumsPanes", "PanelVisible") = "False" Then 
       Panel.Common.Visible = False 
   Else 
       Panel.Common.Visible = True 
   End If 
   Script.RegisterEvent Panel.Common, "OnResize", "OnPanelResize" 
    
   Script.RegisterEvent SDB, "OnChangedSelection", "OnChangedSelection" 
   
   Call FillAlbums
    
End Sub 


'***************************************************** 
'****            INITIALISATION METHODS           **** 
'***************************************************** 

Sub Initialise_LicenseFix 
End Sub 


Sub Initialise_TreeNode 

    Set TreeNode = SDB.MainTree.CreateNode 
    Set SDB.Objects("AlbumsPanes_TreeNode") = TreeNode 
    TreeNode.Caption = "Albums Panes" 
    TreeNode.IconIndex = 46    
    SDB.MainTree.AddNode SDB.MainTree.Node_MyComputer, TreeNode, 1 
    
   Script.RegisterEvent TreeNode, "OnFillTracks", "OnFillTracks" 
    

End Sub 


Sub Initialise_Panel 

    Set Panel = SDB.UI.NewDockablePersistentPanel("AlbumsPanes_Panel") 
   Set SDB.Objects("AlbumsPanes_Panel") = Panel 
   If Panel.IsNew Then 
      Panel.DockedTo = 2 
      Panel.Common.Width = 430 
      Panel.Common.Height = 30 
   End If 
   Panel.Caption = "AlbumsPanes" 
       
   Script.RegisterEvent Panel, "OnClose", "OnPanelClose" 
    
End Sub 


Sub Initialise_ViewMenuItem 

   Set ViewMenuItem = SDB.UI.AddMenuItem(SDB.UI.Menu_View, 1, -3) 
   ViewMenuItem.Caption = "Show Albums Panes" 
   ViewMenuItem.Checked = Panel.Common.Visible 
   ViewMenuItem.Hint = "Show the extra albums panes" 
    
   Script.RegisterEvent ViewMenuItem, "OnClick", "MIClick" 

End Sub 

Sub Initialise_lvAlbums 
	Dim objColumnHeader

    ' Set lvAlbums = SDB.UI.NewActiveX(Panel, "COMCTL.ListViewCtrl") 
    Set lvAlbums = SDB.UI.NewActiveX(Panel, "MSComctlLib.ListViewCtrl.2") 
    
    lvAlbums.Common.Top = 2 
	 lvAlbums.Common.Width = Panel.Common.ClientWidth
    lvAlbums.Common.Height = Panel.Common.ClientHeight - 2
    lvAlbums.Common.Anchors = akLeft + akRight + akTop + akBottom

    lvAlbums.Interf.View = lvwReport 
    lvAlbums.Interf.LabelEdit = lvwAutomatic 
    lvAlbums.Interf.HideSelection = False 
    lvAlbums.Interf.HideColumnHeaders = False
    lvAlbums.Interf.FullRowSelect = True
    lvAlbums.Interf.GridLines = True
    lvAlbums.Interf.AllowColumnReorder = True
    lvAlbums.Interf.BackColor = BackgroundColor 
    lvAlbums.Interf.ForeColor = ForegroundColor 
    
	 lvAlbums.Interf.ColumnHeaders.Clear
   
    Set objColumnHeader = lvAlbums.Interf.ColumnHeaders.Add()
    objColumnHeader.Text = "Artist"
    objColumnHeader.Width = lvAlbums.Common.Width * 0.35
    
    Set objColumnHeader = lvAlbums.Interf.ColumnHeaders.Add()
    objColumnHeader.Text = "Album"
    objColumnHeader.Width = lvAlbums.Common.Width * 0.40

    Set objColumnHeader = lvAlbums.Interf.ColumnHeaders.Add()
    objColumnHeader.Text = "Songs"
    objColumnHeader.Width = lvAlbums.Common.Width * 0.10
    
    Set objColumnHeader = lvAlbums.Interf.ColumnHeaders.Add()
    objColumnHeader.Text = "Last Played"
    objColumnHeader.Width = lvAlbums.Common.Width * 0.15


    ' Call lvAlbums.Interf.ColumnHeaders.Add(, , "Albums", lvAlbums.Common.Width) 
    
   Script.RegisterEvent lvAlbums.Interf, "ItemClick", "OnAlbumSelect" 

End Sub 

Sub FillAlbums()
	Dim RecordCount
	
    Call lvAlbums.Interf.ListItems.Clear 
    Call SDB.ProcessMessages 
    
    Call lvAlbums.Interf.ListItems.Add( , , "<< All >>") 
    lvAlbums.Interf.ListItems(1).Selected = True 

	 RecordCount = AddItemsFromQuery(lvAlbums, "" _ 
                + "SELECT Albums.Album, Albums.ID, Artists.Artist, " _
					+ "(Select Count(*) From Songs where Songs.IDAlbum = Albums.ID)," _
					+ "(Select max(LastTimePlayed) from Songs where Songs.IDAlbum = Albums.ID) " _
					+ " FROM Albums INNER JOIN Artists On Albums.IDArtist = Artists.ID ORDER BY Artists.Artist, Albums.Album ")

    lvAlbums.Interf.ListItems(1).Text = "<< All (" & RecordCount & ") >>" 
    lvAlbums.Interf.ListItems(1).Tag = "ALL" 
    
    Set PreviousAlbumsItem = lvAlbums.Interf.SelectedItem 
    
    Call SDB.ProcessMessages 
    Call DoAlbums 

End Sub


'***************************************************** 
'****            EVENT HANDLING METHODS           **** 
'***************************************************** 

Sub MIClick(ViewMenuItem) 

   ViewMenuItem.Checked = Not ViewMenuItem.Checked 
   Panel.Common.Visible = ViewMenuItem.Checked 
   SDB.IniFile.StringValue("AlbumsPanes", "PanelVisible") = ViewMenuItem.Checked 

End Sub 

Sub OnPanelClose(Panel) 
    
    ViewMenuItem.Checked = False 
   SDB.IniFile.StringValue("AlbumsPanes", "PanelVisible") = "False" 

End Sub 


Sub OnFillTracks(TreeNode) 

    Call SDB.ProcessMessages 
    
    If Not Panel.Common.Visible Then 
       Panel.Common.Visible = True 
       ViewMenuItem.Checked = True 
       SDB.IniFile.StringValue("AlbumsPanes", "PanelVisible") = "True" 
    End If 
    
    Call DoAlbums

End Sub 


Sub OnAlbumSelect(ListItem) 

    Call SDB.ProcessMessages 
    
    If EqualNodes(SDB.MainTree.CurrentNode, TreeNode) Then 
        If Not PreviousAlbumsItem Is Nothing Then 
            If lvAlbums.Interf.SelectedItem.Tag = PreviousAlbumsItem.Tag Then Exit Sub 
        End If 
        LastSelection = "Albums" 
        Call SDB.MainTracksWindow.Refresh 
    Else 
        LastSelection = "Albums" 
        Set SDB.MainTree.CurrentNode = TreeNode 
    End If 
    
End Sub 


Sub OnPanelResize(Panel) 

    If Panel.DockedTo = 0 Then Exit Sub    ' Don't do anything when the panel is being (un)docked 


End Sub 


Sub OnChangedSelection 
    
    If Not EqualNodes(SDB.MainTree.CurrentNode, TreeNode) Then 
        Call DeselectListViews 
    End If 
    
End Sub 


'***************************************************** 
'****                WORKER METHODS               **** 
'***************************************************** 

' called when album is selected
Sub DoAlbums 

    If lvAlbums.Interf.SelectedItem Is Nothing Then Exit Sub 
    
    Call SDB.ProcessMessages 

	If AlbumsTag = "ALL" Then 
		 Call SDB.MainTracksWindow.AddTracksFromQuery("") 
	Else 
		 Call SDB.MainTracksWindow.AddTracksFromQuery(" AND Albums.ID=" + AlbumsTag) 
	End If 
    
    Set PreviousAlbumsItem = lvAlbums.Interf.SelectedItem 
    Call SDB.ProcessMessages 
    
    LastSelection = " " 
    
End Sub 


Function AlbumsTag 
    AlbumsTag = lvAlbums.Interf.SelectedItem.Tag 
End Function 

Function AlbumsTextDQ 
    AlbumsTextDQ = DoubleUpSingleQuotes(lvAlbums.Interf.SelectedItem.Text) 
End Function 


Function AddItemsFromQuery(ListView, FullQuery) 
	Dim Artist, Album, ID, item, lastPlayed, songs

    AddItemsFromQuery = 0 
    
    Dim Iter : Set Iter = SDB.Database.OpenSQL(FullQuery) 
    Do While Not Iter.EOF 
		  Album = Iter.StringByIndex(0) 
		  ID = Iter.StringByIndex(1) 
		  Artist = Iter.StringByIndex(2) 
		  songs = Iter.StringByIndex(3)
		  lastPlayed = Iter.StringByIndex(4) 
		  IF Artist = "" Then
				Artist = "Unknown"
		  End If
		  If Album = "" Then
				Album = "Unknown"
		  End If
		  If lastPlayed = "12/30/1899" Then
				lastPlayed = ""
		  End If
		  
		  Set item = listView.Interf.ListItems.Add
		  item.Text = Artist
		  item.Tag = ID
		  
		  ' Set sub1 = item.SubItems.Add(1, , Album)
		  item.Subitems(1) = Album
		  item.Subitems(2) = songs
		  item.SubItems(3) = lastPlayed
		  ' Set sub1 = item.SubItems.Add
		  ' sub1.Text = Album
		  ' listView.Interf.ListItems(1).ListSubItems.Add 1, , "row 1 sub 1"		  
		  
		  
		  'IF Artist <> "" AND Album <> "" Then
			'	Call ListView.Interf.ListItems.Add(, , Artist & " - " & Album) 
		  'Else
			'	Call ListView.Interf.ListItems.Add(, , "<< Empty >>") 
		  'End If
        
        ' ListView.Interf.ListItems(AddItemsFromQuery + 2).Tag = ID
        Iter.Next 
        AddItemsFromQuery = AddItemsFromQuery + 1 
    Loop 

End Function 


Sub AddTracksFromQueryAdvanced(FullQuery) 

    Call SDB.MainTracksWindow.AddTracksFromQuery("AND Songs.ID IN (" & FullQuery & ")") 

End Sub 


Sub DeselectListViews 

    If Not lvAlbums.Interf.SelectedItem Is Nothing Then 
        lvAlbums.Interf.SelectedItem.Selected = False 
    End If 
        
End Sub 


'***************************************************** 
'****           GENERAL UTILITY METHODS           **** 
'***************************************************** 

Function EqualNodes(Node1, Node2) 

    EqualNodes = False 
    
    If Not Node1 Is Nothing Then 
        If Not Node2 Is Nothing Then 
            If Node1.NodeType = Node2.NodeType Then 
                If Node1.Caption = Node2.Caption Then 
                    EqualNodes = True 
                End If 
            End If 
        End If 
    End If 
    
End Function 


Function Cond(Test, ResultTrue, ResultFalse) 

  If Test Then 
    Cond = ResultTrue 
  Else 
    Cond = ResultFalse 
  End If 

End Function 


Function DoubleUpSingleQuotes(strInput) 

    DoubleUpSingleQuotes = Replace(strInput, "'", "''") 
    
End Function 

[/img]
rafinha

Post by rafinha »

I sent an empty e-mail to fixlp@trixmoto.net but did not get an autoreply mail with a fix.

Any ideas from where the fix can be get?
Diabolic--Destiny

Post by Diabolic--Destiny »

I keep receiving this error upon startup

Code: Select all


Error #1024 - Microsoft VBScript Compilation Error 
Expected statement 
7 
File: "C"\Program Files\MediaMonkey\Scripts\Auto\LibraryPanes.vbs", Line  827, Column 0 
and upon google search
http://community.installshield.com/arch ... 93452.html
I realized it has something to do with using two locations or something

I got this error after using Trixmoto's Backup script to restore my MM settings, Everything works except librarypanes
Steegy
Posts: 3452
Joined: Sat Nov 05, 2005 7:17 pm

Post by Steegy »

@rafinha: If you still haven't got it fixed, please email me.

@Diabolic--Destiny: The script in the first post doesn't have executable code at line 827, so without more info I can't help you.


Please remind that MM3 (for which this script doesn't work) already includes this functionality without the need for a script.
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).
cadmanmeg
Posts: 309
Joined: Sun Nov 19, 2006 5:28 am

Post by cadmanmeg »

Am using MM 2.5.5 and am getting an error upon loading when trying to use library panes. Is a line 192 error and I seem to recall this being an issue from a previous post, but can not find that post. The image below shows my error.

Image


I also get this additional error pop up and not sure why. Is here:

Image

My machine is Win XP Pro and a new install so there should be no conflicts. Thanks for any help you can provide
Last edited by cadmanmeg on Wed Oct 17, 2007 3:18 am, edited 2 times in total.
cadmanmeg
Posts: 309
Joined: Sun Nov 19, 2006 5:28 am

Post by cadmanmeg »

Alright, downloading trixmoto's vbs and it made the error pop up go away, but I still can not find out how to turn on library panes or get it to show. Also tried to other suggestions in the response email, but still a no show. Thought it was automatic? Anyone? Thanks much.
Post Reply