View Manager v1.5 (08-10-08) [MM3]
-
MoDementia
- Posts: 1321
- Joined: Thu Jun 15, 2006 3:26 pm
- Location: Geelong, Victoria, Australia
View Manager v1.5 (08-10-08) [MM3]
No Longer Available
Last edited by MoDementia on Tue Feb 03, 2009 4:03 am, edited 5 times in total.
-
Deadman36g
- Posts: 56
- Joined: Tue Jun 12, 2007 11:32 pm
- Contact:
Re: View Manager v1.2 (26-08-08) [MM3]
Is it possible you could add a way to select None (Show all tracks) from the button as well (So i don't have to go through the options each time).
-
MoDementia
- Posts: 1321
- Joined: Thu Jun 15, 2006 3:26 pm
- Location: Geelong, Victoria, Australia
Re: View Manager v1.3 (28-08-08) [MM3]
New Version
' 26-08-08 Version 1.3
' Added None (Show All Tracks)
' 26-08-08 Version 1.3
' Added None (Show All Tracks)
-
nynaevelan
- Posts: 5559
- Joined: Wed Feb 07, 2007 11:07 pm
- Location: New Jersey, USA
- Contact:
Re: View Manager v1.3 (28-08-08) [MM3]
What are the numbers in the parentheses??
Nyn
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
Link to Favorite Scripts/Skins
Join Dropbox, the online site to share your files
-
MoDementia
- Posts: 1321
- Joined: Thu Jun 15, 2006 3:26 pm
- Location: Geelong, Victoria, Australia
Re: View Manager v1.3 (28-08-08) [MM3]
Filter IDs (Too lazy to store it somewhere else) 
Last edited by MoDementia on Wed Aug 27, 2008 6:25 pm, edited 1 time in total.
-
nynaevelan
- Posts: 5559
- Joined: Wed Feb 07, 2007 11:07 pm
- Location: New Jersey, USA
- Contact:
Re: View Manager v1.3 (28-08-08) [MM3]
Thank you, that helps.
Nyn
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
Link to Favorite Scripts/Skins
Join Dropbox, the online site to share your files
-
Deadman36g
- Posts: 56
- Joined: Tue Jun 12, 2007 11:32 pm
- Contact:
Re: View Manager v1.3 (28-08-08) [MM3]
Thank youMoDementia wrote:New Version
' 26-08-08 Version 1.3
' Added None (Show All Tracks)
-
nynaevelan
- Posts: 5559
- Joined: Wed Feb 07, 2007 11:07 pm
- Location: New Jersey, USA
- Contact:
Re: View Manager v1.3 (28-08-08) [MM3]
Is there a way to refresh the filter list without having to restart MM??
Nyn
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
Link to Favorite Scripts/Skins
Join Dropbox, the online site to share your files
-
MoDementia
- Posts: 1321
- Joined: Thu Jun 15, 2006 3:26 pm
- Location: Geelong, Victoria, Australia
Re: View Manager v1.3 (28-08-08) [MM3]
Not without consequences.
There is no trigger for when filters are added or deleted.
The table would have to be interrogated every 30secs-1min to see if it had changed or on every play/selection which would be a waste of processing time given how rarely these are added / deleted.
There is no trigger for when filters are added or deleted.
The table would have to be interrogated every 30secs-1min to see if it had changed or on every play/selection which would be a waste of processing time given how rarely these are added / deleted.
-
nynaevelan
- Posts: 5559
- Joined: Wed Feb 07, 2007 11:07 pm
- Location: New Jersey, USA
- Contact:
Re: View Manager v1.3 (28-08-08) [MM3]
Ok, I can live with a refresh when I remember to open/close MM. I do not want performance degraded because as you stated the filters are not changed that often, at least not in my db. Although now that I have a much better source to manage them, I am tempted to create some more.
Nyn
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
Link to Favorite Scripts/Skins
Join Dropbox, the online site to share your files
Re: View Manager v1.3 (28-08-08) [MM3]
I like this script! 
And then create a sub which creates the menus:
But it doesn't work correctly. You need to find a way to remove the old menus, you'll understand what I mean when you test it.
Actually, I think you can solve this by using the OnClickFunc on the Filters-menu, like this:MoDementia wrote:Not without consequences.
There is no trigger for when filters are added or deleted.
The table would have to be interrogated every 30secs-1min to see if it had changed or on every play/selection which would be a waste of processing time given how rarely these are added / deleted.
Code: Select all
Set FilterMnu = SDB.UI.AddMenuItemSub(SubMnu,1,-1)
FilterMnu.Caption = "Filters"
FilterMnu.UseScript = Script.ScriptPath
FilterMnu.OnClickFunc = "CreateFilterMenus"Code: Select all
Sub CreateFilterMenus(OnMnu)
Set iter = SDB.Database.OpenSQL("SELECT ID, Name FROM Filters ORDER BY Name")
Do While NOT iter.EOF
Set Mnu = SDB.UI.AddMenuItem(OnMnu,2,-1)
Mnu.Caption = iter.StringByIndex(1) & " (" & iter.StringByIndex(0) & ")"
Mnu.UseScript = Script.ScriptPath
Mnu.IconIndex = SDB.RegisterIcon("Scripts\View Manager\Icons\table_refresh.ico",0)
Script.RegisterEvent Mnu, "OnClick", "btnClickFilter"
iter.Next
Loop
Set iter = Nothing
End subAdvanced Duplicate Find & Fix Find More From Same - Custom Search. | Transfer PlayStat & Copy-Paste Tags/AlbumArt between any tracks.
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!
All My Scripts
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!
All My Scripts
-
MoDementia
- Posts: 1321
- Joined: Thu Jun 15, 2006 3:26 pm
- Location: Geelong, Victoria, Australia
Re: View Manager v1.3 (28-08-08) [MM3]
Thanks Bex,
I refresh the saved views by creating individual SDB.Objects for them and calling DestroyMenus before adding the menus. It would work for the code you suggested too.
However, I think that having to click "Filters" each time to get the sub menus and waiting for them to be rebuilt would be more annoying than restarting MM once in a while?
I refresh the saved views by creating individual SDB.Objects for them and calling DestroyMenus before adding the menus. It would work for the code you suggested too.
However, I think that having to click "Filters" each time to get the sub menus and waiting for them to be rebuilt would be more annoying than restarting MM once in a while?
Code: Select all
Sub CreateFilterMenus(OnMnu)
Call DestroyFilterMenus
Set StringList = SDB.NewStringList
Set iter = SDB.Database.OpenSQL("SELECT ID, Name FROM Filters ORDER BY Name")
Do While NOT iter.EOF
Set Mnu = SDB.UI.AddMenuItem(OnMnu,2,-1)
Mnu.Caption = iter.StringByIndex(1) & " (" & iter.StringByIndex(0) & ")"
Mnu.UseScript = Script.ScriptPath
Mnu.IconIndex = SDB.RegisterIcon("Scripts\View Manager\Icons\table_refresh.ico",0)
Script.RegisterEvent Mnu, "OnClick", "btnClickFilter"
Set SDB.Objects("Filter" & iter.StringByIndex(0)) = Mnu
StringList.Add "Filter" & iter.StringByIndex(0)
iter.Next
Loop
Set iter = Nothing
Set SDB.Objects("VMFilterList") = StringList
End sub
Sub DestroyFilterMenus
Set StringList = SDB.Objects("VMFilterList")
If NOT StringList Is Nothing Then
For xCounter = 0 to StringList.Count - 1
ThisObjectText = StringList.Item(xCounter)
Set Mnu = SDB.Objects(ThisObjectText)
Mnu.Checked = False
Mnu.Visible = False
Script.UnRegisterEvents Mnu
Set Mnu = Nothing
Set SDB.Objects(ThisObjectText) = Nothing
Next
End If
End Sub
Re: View Manager v1.3 (28-08-08) [MM3]
Yes, it takes annoyingly long time to create the menus but you could add a simple check and only recreate them if some have been added/deleted.
Add this to the OnStartup Sub:
And here's the new CreateFilterMenus sub:
You also need to add the create menu statement to the OnStartup sub.
Add this to the OnStartup Sub:
Code: Select all
SDB.IniFile.IntValue("ViewManager","FilterCount")=SDB.Database.OpenSQL("SELECT Count(*) FROM Filters").valuebyindex(0)Code: Select all
Sub CreateFilterMenus(OnMnu)
FilterCount=SDB.Database.OpenSQL("SELECT Count(*) FROM Filters").valuebyindex(0)
If Not SDB.IniFile.IntValue("ViewManager","FilterCount")=FilterCount Then Exit Sub
Call DestroyFilterMenus
Set StringList = SDB.NewStringList
Set iter = SDB.Database.OpenSQL("SELECT ID, Name FROM Filters ORDER BY Name")
Do While NOT iter.EOF
Set Mnu = SDB.UI.AddMenuItem(OnMnu,2,-1)
Mnu.Caption = iter.StringByIndex(1) & " (" & iter.StringByIndex(0) & ")"
Mnu.UseScript = Script.ScriptPath
Mnu.IconIndex = SDB.RegisterIcon("Scripts\View Manager\Icons\table_refresh.ico",0)
Script.RegisterEvent Mnu, "OnClick", "btnClickFilter"
Set SDB.Objects("Filter" & iter.StringByIndex(0)) = Mnu
StringList.Add "Filter" & iter.StringByIndex(0)
iter.Next
Loop
Set iter = Nothing
Set SDB.Objects("VMFilterList") = StringList
SDB.IniFile.IntValue("ViewManager","FilterCount")=FilterCount
End subAdvanced Duplicate Find & Fix Find More From Same - Custom Search. | Transfer PlayStat & Copy-Paste Tags/AlbumArt between any tracks.
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!
All My Scripts
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!
All My Scripts
Re: View Manager v1.3 (28-08-08) [MM3]
I just tested it and it needs some more work but I'm sure you get the picture and sort it out! 
Advanced Duplicate Find & Fix Find More From Same - Custom Search. | Transfer PlayStat & Copy-Paste Tags/AlbumArt between any tracks.
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!
All My Scripts
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!
All My Scripts
-
MoDementia
- Posts: 1321
- Joined: Thu Jun 15, 2006 3:26 pm
- Location: Geelong, Victoria, Australia
Re: View Manager v1.3 (28-08-08) [MM3]
Hehehe I also thought about that , it doesn't work if you add and delete the same amount of filters i.e. you add 1 and delete 1 
I will try and do another version with an option to use either method.
I will try and do another version with an option to use either method.
