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

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

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

Postby onenonymous » Sun Feb 17, 2008 9:19 pm

This script places a new sub-menu in the pop-up menus you get when you right click on song(s) or nodes (Main Window, Track List, Now Playing & Menu_Pop_Tree) as well as a button in the toolbar. It reads through the Scripts.ini file and loads any script of type 0 into the menus. To use, right click on a song or multiple songs or click on a node or the toolbar button and find the new Scripts menu. Select one of the scripts from there. This is the same as if you chose the script from the Scripts menu under the Tools menu. Comments and suggestions for improvement are welcome.

Version 1.6 Update September 7, 2008 - Download the installer
-made lots of code changes based on MoDementia's suggestions (thanks!!!) :D
-streamlined code that processes the scripts.ini file
-added ability to set an icon in the Scripts.ini file, then show it from RCFS. You can set a path to the icon either relative to MM, an absolute path to the file, or a number to use one of MMs built in icons, e.g. any of these will work when included in Scripts.ini (see previous discussions in this thread) :
Code: Select all
Icon=Scripts\View Manager\Icons\table_go.ico
Icon=C:\Windows\mycustom.ico
Icon=22
-For the button/menu maker form, in the Icon edit box, you can now put in <nn> where nn is a number for one of MMs built in icons. For example <22> will use the Monkey icon
-Cleaned up code for placing the separators (I think I got it, but these get tricky so let me know :-? )
-Changed the way it records if one of the separator check-boxes are selected to account for a bug noted earlier with non-English implementations (viewtopic.php?f=2&t=26383&st=0&sk=t&sd=a&start=150#p165371)
-Added "Clear All" button to the button/menu maker form
-Added button to the button/menu maker form for the first row to clear it also
-Added a new menu item to Refresh Menus. This will delete all the RCFS menus/buttons, then re-build everything, same as if MM was re-started. Because of this, the positions of RCFS menus/buttons relative to other menu items may change. When you restart, they're back where they belong. I'll look into enhancing this for future revisions.
-A few other enhancements to the code to hopefully run more efficiently

Version 1.51 Update August 30, 2008 - Download the installer
-fixed captions for checkboxes showing up in some skins (should have been no caption)
-fixed code to delete all buttons and separators before creating new ones rather than delete 1st, add 1st, delete 2nd, add 2nd, etc.
- a few other minor tweaks to code

Version 1.5 Update August 18, 2008 - Download the installer
-Added ability to create buttons or menus for any of the scripts that are loaded in the right-click menus.
See description here

Version 1.42 Update July 6, 2008 - Download the installer
-Added code suggested by MoDementia to allow for use of auto-scripts. Users will need to manually add any auto scripts entries in scripts.ini if the original script author doesn't do it for you. You'll also need to figure out what procedure to call from the original script.
-Added code to see if my (new) RightClickForReports script is running, and if so, group the two sub-menus together in the same right-click section

Version 1.4 Update April 5, 2008 Download the installer
-Fixed code to now add a snippet to other scripts to allow them to work off the right-click menus.
-Added code to hide the right-click menus if you uninstall from Tools/Extensions...

Version 1.2.3 Update March 17, 2008
-Added 'On Error Resume Next" throughout
-Added checking for missing script files and skips loading them
-Changed code that used Regexp to use Instr

Version 1.21 Update March 16, 2008
-Created an installer file
-Fixed a bug that errored the 2nd time some scripts were run off the right-click menu

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.

Version 1.1a Updated Feb 25, 2008
-Added bubblesort to sort the scripts in my right-click menu
-Fixed a problem where some scripts weren't running correctly
-Added instructions to modify other scripts that still error

Search terms: Right Click For Scripts, RCFS, Right Click 4 Scripts, RightClickForScripts, RightClick4Scripts, Context menu, Right Click Menu, RightClickMenu
Last edited by onenonymous on Sun Sep 07, 2008 3:07 pm, edited 17 times in total.
onenonymous
 
Posts: 374
Joined: Sat Feb 02, 2008 1:09 pm
Location: Texas

Postby spacefish » Sun Feb 17, 2008 11:17 pm

This is just what I wanted! I don't know how many times I've right-clicked and wanted to execute a script and thought "D'oh!". Thanks, I'll give it a try. :)
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
spacefish
 
Posts: 1427
Joined: Mon Jan 14, 2008 7:21 am
Location: Denmark

Postby nynaevelan » Mon Feb 18, 2008 12:10 am

I get an error message which states line 9.

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
nynaevelan
 
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA

Postby cadmanmeg » Mon Feb 18, 2008 4:55 am

Nice idea for a script as this would be great to use, but I too have an issue upon loading MM3 with an error with this script. Gives a MS vbscript #1041 error and then mentions:

name redefined: 'mmAnchorRight'
error line 42

Any ideas here?

Would be nice to get this working! Thanks much!
cadmanmeg
 
Posts: 309
Joined: Sun Nov 19, 2006 5:28 am

Postby onenonymous » Mon Feb 18, 2008 9:09 am

@Nyn - when does this error occur? line 9 is a comment so shouldn't cause any problems on loading.

@cadmanmeg - I saw that error on some of my scripts during testing. It looked like it was tied to the problem I had with getting the "script.include" part to work. Which script are you running when it gives this error?
onenonymous
 
Posts: 374
Joined: Sat Feb 02, 2008 1:09 pm
Location: Texas

Postby nynaevelan » Mon Feb 18, 2008 9:29 am

onenonymous wrote:@Nyn - when does this error occur? line 9 is a comment so shouldn't cause any problems on loading.

@cadmanmeg - I saw that error on some of my scripts during testing. It looked like it was tied to the problem I had with getting the "script.include" part to work. Which script are you running when it gives this error?


That's what I was thinking but then I get this error right after, and it occurs as soon as I open MM.

Image

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
nynaevelan
 
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA

Postby onenonymous » Mon Feb 18, 2008 10:25 am

nynaevelan wrote:That's what I was thinking but then I get this error right after, and it occurs as soon as I open MM.
hmm - I'm not sure what's going on - but have a thought. In my script I set "itm" and "subItm" to be my menu items. It might be that one of your scripts also has those set, so mine are stepping on it. Can you try this and see if it helps: search and replace all instances of itm to become popItm and subItm to become popSubItm. There are 8 instances of itm and 4 instances of subItm to replace. Save, re-start MM and see if that fixes it.

If this doesn't fix it, were there any other error messages before or after the one you showed?

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

Postby nynaevelan » Mon Feb 18, 2008 11:39 am

I tried your suggestion and it did not help, I also tried moving all scripts out of the Auto folder and reopening MM, the same errors. Here they are:

Image

Image

Image

Any other suggestions, I'm willing to work with you to try to get this working?

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
nynaevelan
 
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA

Postby onenonymous » Mon Feb 18, 2008 11:59 am

Thanks for trying - I'm an amateur programmer just now getting into MM3 scripts, so may need one of the veterans to give me a hint.

One more thing to try - since it says the error is in line 9 - try deleting all the comments above the line with Option Explicit. I don't know why line 9 would be causing the problem though. If it still errors, let me know which line it now says causes the error.
onenonymous
 
Posts: 374
Joined: Sat Feb 02, 2008 1:09 pm
Location: Texas

Postby onenonymous » Mon Feb 18, 2008 11:59 am

Thanks for trying - I'm an amateur programmer just now getting into MM3 scripts, so may need one of the veterans to give me a hint.

One more thing to try - since it says the error is in line 9 - try deleting all the comments above the line with Option Explicit. I don't know why line 9 would be causing the problem though. If it still errors, let me know which line it now says causes the error.
onenonymous
 
Posts: 374
Joined: Sat Feb 02, 2008 1:09 pm
Location: Texas

Postby nynaevelan » Mon Feb 18, 2008 12:17 pm

Same error messages, with Option Explicit on line 1.

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
nynaevelan
 
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA

Postby bob61 » Mon Feb 18, 2008 12:50 pm

Nice idea for script, but I too get error message, though different line number than mentioned before:

Image
Image
bob61
 
Posts: 157
Joined: Sun Dec 09, 2007 4:52 pm

Postby onenonymous » Mon Feb 18, 2008 12:55 pm

I'm guessing there's a collision in two of your scripts. My script does a series of "script.include" commands, so likely that's the culprit. I've got 3 scripts that I use that have the line "Const mmListDropdown = 2" in them. I don't error though, so not sure why you do.

Looking in those scripts - it doesn't appear that this constant is used anywhere. Can you try commenting out the lines with "Const mmListDropdown = 2" that appear in other scripts? I found it in:
[C:\Program Files\MediaMonkey\Scripts\Auto\CaseModify.vbs] Line 102 : Const mmListDropdown = 2
[C:\Program Files\MediaMonkey\Scripts\Case.vbs] Line 84 : Const mmListDropdown = 2
[C:\Program Files\MediaMonkey\Scripts\Stats.vbs] Line 33 : Const mmListDropdown = 2
You of course may have it in other scripts that I don't have on my system, so there may be some sleuthing here. I don't know if this will break those scripts - but it didn't appear to on my system

Thanks for your efforts...

Any MM script masters out there have any other ideas?

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

Postby nynaevelan » Mon Feb 18, 2008 1:27 pm

Ok, by using a process of elimination I figured out it is Bex's SQL Viewer script.

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
nynaevelan
 
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA

Postby onenonymous » Mon Feb 18, 2008 2:03 pm

nynaevelan wrote:Ok, by using a process of elimination I figured out it is Bex's SQL Viewer script.

Cool - does that mean it's working on your system now?

I'm not on my work PC now, so I can't test Bex's script to see if it causes problems for me also, but I'll check as soon as I can.
onenonymous
 
Posts: 374
Joined: Sat Feb 02, 2008 1:09 pm
Location: Texas

Next

Return to Need Help with Addons?

Who is online

Users browsing this forum: stan9980 and 9 guests