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

Post a reply

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: LibraryPanes: Library panes like these in Winamp, iRiver, ..

by baker » Thu Dec 20, 2007 12:07 pm

Is it possible to remove the Album column?

by cadmanmeg » Mon Oct 22, 2007 1:00 am

While that issue mentioned above does bother me, I think I have decided for now to just forego using Library Panes. Thanks for the input and if you know off the top of your head about the vbs issue as mentioned, I would be glad to hear of it. Thanks again!

by cadmanmeg » Mon Oct 22, 2007 12:58 am

Steegy...that was it. Dang...now I feel like a knucklehead. LOL! I could have sworn I checked and made sure that it was installed right.

One thing I noticed that is this. See, I run CAD software which also can use VB aps. Anyhow, since correcting this issue, whenever I startup MM, it now tries to configure something with my CAD software. However, if I once again disable library panes, that behavior no longer happens. In my last PC setup, prior to this rebuild, I never had that issue. I am pretty sure nothing is out of the ordinary as far as how things are installed and all. I do consider myself pretty technical in terms of PC's and the use thereof, but this perplexes me. Thoughts on this?

Thanks much.

by Steegy » Sun Oct 21, 2007 7:52 am

Make sure that the script is installed correctly. It should be installed to the MM 2.5 Scripts\Auto folder as script file (extension .vbs, not .vbs.txt). By default Windows hides (most) file extensions (which can cause user problems), but this can easily be changed in the folder options.

by cadmanmeg » Sun Oct 21, 2007 12:08 am

I do not see it in the view menu. Any further suggestions? Thanks much.

by trixmoto » Wed Oct 17, 2007 4:00 am

You toggle the panel on and off using the View menu.

by cadmanmeg » Wed Oct 17, 2007 3:11 am

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.

by cadmanmeg » Wed Oct 17, 2007 3:01 am

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

by Steegy » Wed Aug 15, 2007 10:51 am

@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.

by Diabolic--Destiny » Mon Aug 13, 2007 1:17 am

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

by rafinha » Wed Aug 01, 2007 11:51 am

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?

by werdna » Wed Jul 11, 2007 9:34 am

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]

Re: solved

by Guest » Wed Jun 27, 2007 10:50 pm

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.

Re: solved

by Guest » Wed Jun 27, 2007 10:49 pm

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

by Steegy » Tue Jun 19, 2007 2:21 pm

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.

Top