I have two questions.
First to any moderators would it be possible to make a page that any scripts or maybe skins that people make could be posted as a download with a short keyword rich description and a link to any related forum pages. It just seems like these forums are full of little scripts with no easy logical way to sort and find them. Besides just reading through all the posts. I think a lot of people would find this useful, it would also be a good way to keep up with new versions or variations of scripts that are out there.
Second I found a script the other day in this forum for using the number keys to rate songs. so I cut the posted code and spent probably way too long trying to figure out how to make it a usable file, something I couldn't find any documentation on (maybe someone could fix that or maybe Im just blind) I eventually went to download.com and searched for.vbs and found a program that worked but thats not really not the point of this post. Once I figured out how to get the script running it worked but was only set up to do whole stars not halves. I remembered the posting saying that this was easily changable so i thought i would apply my total lack of programming knowledge to the task and actually got it to sort of do what i wanted. I can get whole and half stars but for some reason only up to 3 stars. keys 7, 8, & 9 just give me the "don't press this key "dink"". I tried to go back and search for the original posting for help but couldn't find it . So if anyone wants to take pity on me and help me out here is the code as i have altered it
'==========================================================================
'
' MediaMonkey Script
'
' NAME: Predefined RATING Script v1.0
'
' AUTHOR: Ralf
' DATE : 24.08.2005
'
' NOTE: Idea taken from Pekes "Predefined Genre Script v1.0"
'
' INSTALL:
' * Change Defaults in "Variable Configuration" Section of this file
' * Copy to Scripts\Auto directory
'
'==========================================================================
'==========================================================================
' Variable Definition (Do Not Change)
'==========================================================================
' Hotkey Variables
Dim Use_Shift, Use_Ctrl, Use_Alt
'==========================================================================
' Variable Configuration
'==========================================================================
'Set Value to TRUE/FALSE if you want to it use in HotKey
Use_Shift = FALSE 'TRUE
Use_Ctrl = FALSE 'TRUE
Use_Alt = FALSE 'TRUE
MenuIcon = 64
'==========================================================================
' MediaMonkey On Start Procedure
'==========================================================================
Sub OnStartup
'--------------
' Build the hotkey modifier
'--------------
Dim HotKeyRing
HotKeyRing = ""
If Use_Shift Then
HotKeyRing = HotKeyRing&"Shift+"
End if
If Use_Ctrl Then
HotKeyRing = HotKeyRing&"Ctrl+"
End if
If Use_Alt Then
HotKeyRing = HotKeyRing&"Alt+"
End if
'----------------
' Create a new menu entry
'----------------
' first we make a separator
SDB.UI.AddMenuItemSep SDB.UI.Menu_Edit, 0, 0
Dim RatingMenu
Set RatingMenu = SDB.UI.addMenuItemSub(SDB.UI.Menu_Edit,0,0)
RatingMenu.caption = "Change Rating"
RatingMenu.IconIndex = MenuIcon
RatingMenu.useScript = Script.ScriptPath
'----------------
' Create the sub menus
'----------------
Dim RatingSubmenu(6)
Dim i
for i = 0 to 5
Set RatingSubmenu(i) = SDB.UI.AddMenuItem(RatingMenu,0,0)
RatingSubmenu(i).Caption = i & " Star"
RatingSubmenu(i).OnClickFunc = "PredefinedRating"
RatingSubmenu(i).UseScript = Script.ScriptPath
RatingSubmenu(i).IconIndex = MenuIcon
RatingSubmenu(i).ShortCut = HotKeyRing&i
Next
End Sub
Sub EditRating(i_rating)
Dim songlist, song, i
If SDB.SelectedSongList.count = 0 Then
Result = SDB.MessageBox( "No tracks Selected!", mtError, Array(mbOk))
Exit Sub
End If
Set songlist = SDB.SelectedSongList
For i=0 To songlist.count-1
Set song = songlist.Item(i)
song.Rating = i_rating
song.UpdateDB
Next
End Sub
Sub PredefinedRating(Item)
' Rating varies from 0 (= 0 stars) to 100 (= 5 stars)
' So we multiply caption (= 0...10) with 10
EditRating(Left(Item.Caption,1)*10)
End Sub
My Changes were basically changing the (= 0...5) to (= 0...10) and changing the multiplyer "with 20" to ten
I also screwed around with a few other things that i think i put back
Scripts Posting Page
Notwithstanding bezukof's minor mistakes, here is a classic example of what many users of MM come across. It is easy to get excited about the possiblity of customising MM to your liking - a fantastic tool that can be actually modified by "simple" VB scripts. Then you get stuck on some silly little syntactical issue because you dont know VB. Then you go looking for that simple example you saw "somewhere" in "one of the forums".
Without wishing to sound ungrateful, the documentation on the database properties and methods is far too light. Basic definitions and almost no examples of use. But better than nothing.
It would be very very useeful to have a place to go to see all the scripts and examples posted in a downloadable area.
Without wishing to sound ungrateful, the documentation on the database properties and methods is far too light. Basic definitions and almost no examples of use. But better than nothing.
It would be very very useeful to have a place to go to see all the scripts and examples posted in a downloadable area.
Regards
Philby
Philby
Got it working
I guess I sort of figured it out on my own. instead of trying to make one script do all ten ratings, I changed the first script back to the way i found it (whole stars only) then I copied that into a second script and enabled the cntrl option and added +10 after the multiplier so the second script will give me my half stars and even better i can now rate my whole library without having to move my palms. perfect.
I do want to say again how useful a download only script and modification page would be
Edit: I Changed the +10 to a minus ten, it works better that way
I do want to say again how useful a download only script and modification page would be
Edit: I Changed the +10 to a minus ten, it works better that way