Right Click for Scripts -with buttons! (2008-09-07) [MM3]

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

Moderators: Peke, Gurus

onenonymous
Posts: 374
Joined: Sat Feb 02, 2008 1:09 pm
Location: Texas

Post by onenonymous »

Almost for sure you've got the double quote missing at the end of the line. Trix also missed one after the ampersand in his suggestion. The line should be:

Code: Select all

sPath = sdb.ApplicationPath & "Scripts\Case.vbs"
I'm still looking into ways to avoid the need for this workaround -so if anyone has any suggestions, please let me know.
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

Haha! :oops: I've fixed mine now to avoid confusion!
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 wrote:Haha! :oops: I've fixed mine now to avoid confusion!
Ok, when you say you've fixed yours, do you mean you fixed your personal scripts on your machine, or are you saying you fixed the scripts that you've created and when they are released in the future adjustments will not be needed? I ask because I have a couple of yours which I needed to change.

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 »

No, I just mean I fixed the snippet of code which I posted above.
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 wrote:No, I just mean I fixed the snippet of code which I posted above.
Ah Ha, I was hoping you were going to say you had a solution so that I wouldn't have to keep making all those changes. :(

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 »

What changes?
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.
spacefish
Posts: 1427
Joined: Mon Jan 14, 2008 7:21 am
Location: Denmark

Post by spacefish »

The changes we need to make to various scripts that won't run from the right-click menu otherwise. Apparently Nyn has quite a few that need editing. That's what I was trying to do earlier when you replied.
Image
MM Gold 3.0.3.1183 : Vista HP SP1 (x86) : Zen Stone (2GB)
Zekton: An original MM3 skin by Eyal.
Scripts in Use: Add/Remove PlayStat | Auto Album DJ | AutoRateAccurate | Backup
Case & Leading Zero Fixer | Classification & Genre Changer | Clean Scripts.ini | Clear
Field | Custom Report | Discogs Auto-Tag Web Search | Forget Crossfade | Invert
Selection/Select None | Last 100... | Lyricator | Lyrics to Instrumental | MonkeyRok
MusicBrainz Tagger | My Custom Nodes | Now Playing Art Node | Play History & Stats
Right Click for Reports | Right Click for Scripts | Right Click for Web | Stop After Current
WebNodes
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

Well if someone wants to send me a PM telling me what scripts don't work I'll try to take a look and see what I can do.
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 wrote:Well if someone wants to send me a PM telling me what scripts don't work I'll try to take a look and see what I can do.
Sent :P

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'll try to avoid using Script.ScriptPath wherever possible when updating my scripts and this should mean that more scripts will become compatible in the future. If people are struggling with particular scripts, make a post in that script's thread and I'll add it to my list.
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.
spacefish
Posts: 1427
Joined: Mon Jan 14, 2008 7:21 am
Location: Denmark

Post by spacefish »

Okay, I guess I missed the last " when copying the text to paste into the script. It works now. Thank you. :)
Image
MM Gold 3.0.3.1183 : Vista HP SP1 (x86) : Zen Stone (2GB)
Zekton: An original MM3 skin by Eyal.
Scripts in Use: Add/Remove PlayStat | Auto Album DJ | AutoRateAccurate | Backup
Case & Leading Zero Fixer | Classification & Genre Changer | Clean Scripts.ini | Clear
Field | Custom Report | Discogs Auto-Tag Web Search | Forget Crossfade | Invert
Selection/Select None | Last 100... | Lyricator | Lyrics to Instrumental | MonkeyRok
MusicBrainz Tagger | My Custom Nodes | Now Playing Art Node | Play History & Stats
Right Click for Reports | Right Click for Scripts | Right Click for Web | Stop After Current
WebNodes
MoDementia
Posts: 1321
Joined: Thu Jun 15, 2006 3:26 pm
Location: Geelong, Victoria, Australia

Post by MoDementia »

I was just about to install this (and prob still will) but decided to read the comments first.

I vaguely remember a similar problem back in my scripting days and seem to recall that you can "execute" scripts rather than including them.

When I get some more time I'll try and find the code, I'm sure its in one of mine somewhere.

EDIT: Ah I see you have already changed it to execute Good.

There is something else I had to do because it doesn't quit your script while it runs the other, its coming back to me now :)

EDIT: Maybe I spoke too soon re first edit. Will have to install to check some code suggestions.
MoDementia
Posts: 1321
Joined: Thu Jun 15, 2006 3:26 pm
Location: Geelong, Victoria, Australia

Post by MoDementia »

I didnt find what I thought I remembered but I did find this thread

http://www.mediamonkey.com/forum/viewtopic.php?t=4124

It may or may not be useful
onenonymous
Posts: 374
Joined: Sat Feb 02, 2008 1:09 pm
Location: Texas

Post by onenonymous »

Updated code in the first post.

Version 1.2 Update March 15, 2008
-Cleaned up the code to run more efficiently
-Added button to the toolbar
-Added logging capability (click the toolbar button to use)
-Added ability to automatically fix scripts that failed off the right-click menu. Those scripts are first backed up with a '.bak' extension, then modified to work with the right-click menu. If you re-install a script that needed modification, you may need to re-start MM to get it to work off the right-click menu.
-Added code to create MM objects for each of the right-click menus. This way other scripters can access them from their scripts. This is explained below.

OPTIONAL FOR OTHER SCRIPTERS:
Other scripts can now access the right-click Scripts menus just as they would the MM built-in menus. This would be useful for scripts that load from Scripts/Auto folder and manually put a menu item into Tools/Scripts menus. There are five new menus available for you to use:
  • Menu_Pop_NP_MainWindow_Scripts
    Menu_Pop_TrackList_Scripts
    Menu_Pop_NP_Scripts
    Menu_Pop_Tree_Scripts
    Menu_TbStandard_Scripts
Here's an example on how to use it for the Scripts button in the toolbar. Simply copy the code below into the appropriate place in your script, then adjust the code as needed. You would do this for each of the 5 new script menus you wanted to put your menu into.

Code: Select all

	If SDB.Objects("Menu_TbStandard_Scripts") is Nothing Then
		Set objTBStandard_Scripts = sdb.UI.AddMenuItemSub(sdb.UI.Menu_TbStandard, -1, -1)
		Set SDB.Objects("Menu_TbStandard_Scripts") = objTBStandard_Scripts
	Else
		Set objTBStandard_Scripts = SDB.Objects("Menu_TbStandard_Scripts")
	End If
	
	Set objMenuItm = sdb.UI.AddMenuItem(objTBStandard_Scripts, -1, -1)
	objMenuItm.Caption = "Your Caption"
	objMenuItm.Hint = "This is the hint for your menu."
    Script.RegisterEvent objMenuItm, "OnClick", "YourProcedure" 
spacefish
Posts: 1427
Joined: Mon Jan 14, 2008 7:21 am
Location: Denmark

Post by spacefish »

I think your next update should include a .mmip installer. I'm lazy. :lol:

Thanks for the great script!
Image
MM Gold 3.0.3.1183 : Vista HP SP1 (x86) : Zen Stone (2GB)
Zekton: An original MM3 skin by Eyal.
Scripts in Use: Add/Remove PlayStat | Auto Album DJ | AutoRateAccurate | Backup
Case & Leading Zero Fixer | Classification & Genre Changer | Clean Scripts.ini | Clear
Field | Custom Report | Discogs Auto-Tag Web Search | Forget Crossfade | Invert
Selection/Select None | Last 100... | Lyricator | Lyrics to Instrumental | MonkeyRok
MusicBrainz Tagger | My Custom Nodes | Now Playing Art Node | Play History & Stats
Right Click for Reports | Right Click for Scripts | Right Click for Web | Stop After Current
WebNodes
Post Reply