RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [MM2+]

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

Re: RegExp Find & Replace 3.3 w/ 90+ presets (2009-02-02)[MM2+3]

Postby MarineBrat » Tue Feb 10, 2009 11:04 pm

I'd like to take bytes 6 and 7 from the album field and copy them into (overwriting) the Custom5 field. Is this possible?
MarineBrat
 
Posts: 484
Joined: Tue Jun 14, 2005 12:12 am
Location: Loony left coast, USA.

Re: RegExp Find & Replace 3.3 w/ 90+ presets (2009-02-02)[MM2+3]

Postby ZvezdanD » Wed Feb 11, 2009 7:09 pm

justin_f wrote:How would I move the song version from the title to Custom 1?

From what:
Code: Select all
^.*

Into: Custom 1
Regular expression 1: checked
Replace with:
Code: Select all
RegSub(RegExp(oSongData.Title, "([\([])([^)\]]*\b(?:(?:re)?mix|version|edit|extended|dub|instrumental|live|demo)(?=\W)[^([]*)([\)\]])$", 0), "^.(.*).", "$1")

VBScript expression: checked
Magic Nodes 4.2 (2011-07-01) RegExp Find & Replace 4.3 (2011-07-06)  Invert Selection/Select None 1.5 (2012-02-04)  Export M3Us/Create Playlists for Child Nodes 3.6.1 (2012-01-09)  Expand Child Nodes/Expand All 1.1.1 (2012-02-13)  Event Logger 2.4.1 (2012-02-06)  Filtered Statistics Report 1.5.1 (2009-10-09)  Track Redirection & Synchronization 3.4 (2012-10-08)  Restore/Synchronize Database 3.1.1 (2012-05-31)  Find Currently Playing Track 1.2 (2012-02-14)  Queue List 1.2 (2012-02-06)  Add to Library on Play 1.0 (2010-10-20)  Tree Report for Child Nodes 1.1 (2010-11-04)  Update Location of Files in Database 1.3.3 (2012-06-12)  Inherit Child Playlists 1.0 (2012-01-16)
Add Currently Playing/Selected Track(s) to Playlist 1.1.1 (2012-02-06)
ZvezdanD
 
Posts: 2594
Joined: Thu Jun 08, 2006 7:40 pm

Re: RegExp Find & Replace 3.3 w/ 90+ presets (2009-02-02)[MM2+3]

Postby ZvezdanD » Wed Feb 11, 2009 7:23 pm

MarineBrat wrote:I'd like to take bytes 6 and 7 from the album field and copy them into (overwriting) the Custom5 field.

From what:
Code: Select all
^.*

Into: Custom 5
Regular expression 1: checked
Replace with:
Code: Select all
RegSub(RegExp(oSongData.AlbumName, "^.{5}..", 0), "^.{5}", "")

VBScript expression: checked
Magic Nodes 4.2 (2011-07-01) RegExp Find & Replace 4.3 (2011-07-06)  Invert Selection/Select None 1.5 (2012-02-04)  Export M3Us/Create Playlists for Child Nodes 3.6.1 (2012-01-09)  Expand Child Nodes/Expand All 1.1.1 (2012-02-13)  Event Logger 2.4.1 (2012-02-06)  Filtered Statistics Report 1.5.1 (2009-10-09)  Track Redirection & Synchronization 3.4 (2012-10-08)  Restore/Synchronize Database 3.1.1 (2012-05-31)  Find Currently Playing Track 1.2 (2012-02-14)  Queue List 1.2 (2012-02-06)  Add to Library on Play 1.0 (2010-10-20)  Tree Report for Child Nodes 1.1 (2010-11-04)  Update Location of Files in Database 1.3.3 (2012-06-12)  Inherit Child Playlists 1.0 (2012-01-16)
Add Currently Playing/Selected Track(s) to Playlist 1.1.1 (2012-02-06)
ZvezdanD
 
Posts: 2594
Joined: Thu Jun 08, 2006 7:40 pm

Re: RegExp Find & Replace 3.3 w/ 90+ presets (2009-02-02)[MM2+3]

Postby MarineBrat » Wed Feb 11, 2009 10:41 pm

That worked great on the Album bytes 6 & 7 to Custom5. I ran it on about 900 songs and it took a while, maybe 5 minutes, but it worked just fine.

Thanks!!!
MarineBrat
 
Posts: 484
Joined: Tue Jun 14, 2005 12:12 am
Location: Loony left coast, USA.

Re: RegExp Find & Replace 3.3 w/ 90+ presets (2009-02-02)[MM2+3]

Postby Teknojnky » Fri Feb 20, 2009 4:10 pm

A couple ideas to consider..

- Adding the version # in the dialog title would make it easier to see what version is installed. (I realize you can check the extentions dialog and update from there, but with dozens of scripts it can be wieldy to scroll through, not to mention the extentions are stored machine specific)

- The close button does nothing while processing a large number of files, ideally clicking close would hide the window while continuing processing in the background. Once the dialog is closed/hidden, processing could be aborted by right clicking status and terminate.

Alternatively and probably easier to implement, but not as convenient for the user, you could simply set the close button to disabled to have a visual indication that the dialog must remain open during processing (returning it to enabled after processing of course).

In either case, it would be nice if the dialog was not modal so that you could access main MM window to do other things.

- It would be really cool if you could do the find and replace on global fields instead of on an individual track basis. Like for Example, If I want to run a search/replace on genres, that it would run on the genre list, rather than the genre's of individual files. This would help keep consistency of tags so that some tags were not one case vs another a different case.

I think this would apply to most fields except track specific stuff like title and comments.
Teknojnky
 
Posts: 5509
Joined: Tue Sep 06, 2005 11:01 pm

Re: RegExp Find & Replace 3.3 w/ 90+ presets (2009-02-02)[MM2+3]

Postby ZvezdanD » Fri Feb 20, 2009 6:17 pm

Teknojnky wrote:A couple ideas to consider..

Thanks for suggestions, I'll consider to implement some of them in a next version. I am not sure if I should add the version number to the title bar of the Find & Replace dialog since such information could be already found in the Extensions dialog (if you are really curious, you could always take a look for it at the begin of the .vbs file). Maybe it is better idea to put that information in the Options dialog on its option sheet. Could you explain what you mean by "the extentions are stored machine specific"?

Regarding of the Close button, I think I will simple rename it to Cancel when user choose some time consuming operation (Find Next/Replace All) and if user click on that button the script would terminate that operation.

Your ideas are really valuable. Thanks again!
Magic Nodes 4.2 (2011-07-01) RegExp Find & Replace 4.3 (2011-07-06)  Invert Selection/Select None 1.5 (2012-02-04)  Export M3Us/Create Playlists for Child Nodes 3.6.1 (2012-01-09)  Expand Child Nodes/Expand All 1.1.1 (2012-02-13)  Event Logger 2.4.1 (2012-02-06)  Filtered Statistics Report 1.5.1 (2009-10-09)  Track Redirection & Synchronization 3.4 (2012-10-08)  Restore/Synchronize Database 3.1.1 (2012-05-31)  Find Currently Playing Track 1.2 (2012-02-14)  Queue List 1.2 (2012-02-06)  Add to Library on Play 1.0 (2010-10-20)  Tree Report for Child Nodes 1.1 (2010-11-04)  Update Location of Files in Database 1.3.3 (2012-06-12)  Inherit Child Playlists 1.0 (2012-01-16)
Add Currently Playing/Selected Track(s) to Playlist 1.1.1 (2012-02-06)
ZvezdanD
 
Posts: 2594
Joined: Thu Jun 08, 2006 7:40 pm

Re: RegExp Find & Replace 3.3 w/ 90+ presets (2009-02-02)[MM2+3]

Postby Teknojnky » Fri Feb 20, 2009 7:52 pm

re machine specifc: when you install a MMIP, the extentions.ini and uninstall scripts are stored @ documents & settings\all users\application data\mediamonkey\extentions, so that they are not kept with the MM install folder when it is installed to portable drive (external drive or mp3 player for portable use).

this means if you install a script on one machine, it does not show up in the extentions dialog unless its installed again on the other machine(s).

re version in window title, much like the forum topic, having the version info on the script window makes it easy to see what version is installed at a glance. I know I can open the script or extentions dialog (aside from the above multi-machine issue). This not really specific to this script, but any script which opens a dialog or panel it would be nice to see the version in the window title. Not a big deal, just a convenience I like.
Teknojnky
 
Posts: 5509
Joined: Tue Sep 06, 2005 11:01 pm

Re: RegExp Find & Replace 3.4 w/ 101 presets (2009-02-21)[MM2+3]

Postby ZvezdanD » Sat Feb 21, 2009 5:37 pm

There is the new update of the script:

v3.4 - 2009-02-21
- Added: possibility to cancel Find Next/Replace All operations;
- Added: insert of the field name on the cursor position in the Replace with edit box (MM 3.1.0.1222 or up);
- Added: some new presets;
- Improved: speed of the Replace All (drastically) when there are many unmatched tracks.
Magic Nodes 4.2 (2011-07-01) RegExp Find & Replace 4.3 (2011-07-06)  Invert Selection/Select None 1.5 (2012-02-04)  Export M3Us/Create Playlists for Child Nodes 3.6.1 (2012-01-09)  Expand Child Nodes/Expand All 1.1.1 (2012-02-13)  Event Logger 2.4.1 (2012-02-06)  Filtered Statistics Report 1.5.1 (2009-10-09)  Track Redirection & Synchronization 3.4 (2012-10-08)  Restore/Synchronize Database 3.1.1 (2012-05-31)  Find Currently Playing Track 1.2 (2012-02-14)  Queue List 1.2 (2012-02-06)  Add to Library on Play 1.0 (2010-10-20)  Tree Report for Child Nodes 1.1 (2010-11-04)  Update Location of Files in Database 1.3.3 (2012-06-12)  Inherit Child Playlists 1.0 (2012-01-16)
Add Currently Playing/Selected Track(s) to Playlist 1.1.1 (2012-02-06)
ZvezdanD
 
Posts: 2594
Joined: Thu Jun 08, 2006 7:40 pm

Re: RegExp Find & Replace 3.4 w/ 101 presets (2009-02-21)[MM2+3]

Postby MarineBrat » Sun Feb 22, 2009 7:27 pm

This script is awesome! I wish it weren't Greek to me. :)

Can you help me to...

Strip the first 4 characters from the album field?
MarineBrat
 
Posts: 484
Joined: Tue Jun 14, 2005 12:12 am
Location: Loony left coast, USA.

Re: RegExp Find & Replace 3.4 w/ 101 presets (2009-02-21)[MM2+3]

Postby MarineBrat » Sun Feb 22, 2009 7:37 pm

MarineBrat wrote:This script is awesome! I wish it weren't Greek to me. :)

Can you help me to...

Strip the first 4 characters from the album field?


Nevermind, I just installed the latest version and it had a preinstalled script that does just that...

"Remove any six characters from the begin of the Album"

I changed the 6 to a 4 and it's exactly what I'm looking for!
MarineBrat
 
Posts: 484
Joined: Tue Jun 14, 2005 12:12 am
Location: Loony left coast, USA.

Re: RegExp Find & Replace 3.4 w/ 101 presets (2009-02-21)[MM2+3]

Postby stan9980 » Tue Feb 24, 2009 11:11 am

I've just upgraded to RegExp Find & Replace 3.4, and something seems to be wrong, I can find but I can't replace!

Both the presets and a few of my own presets will select the appropriate replacement and show the correct result, but nothing happens when clicking on the replace or replace all buttons.

Everything had been working fine prior to the upgrade.

I've tried completely uninstalling the script and reinstalling from scratch (i.e. not keeping the previous settings). I'm using MediaMonkey 3.0.6.1190. Anyone have any idea what's going on?

stan9980
stan9980
 
Posts: 100
Joined: Tue Nov 06, 2007 6:28 am

Re: RegExp Find & Replace 3.4 w/ 101 presets (2009-02-21)[MM2+3]

Postby ZvezdanD » Tue Feb 24, 2009 7:14 pm

stan9980 wrote:nothing happens when clicking on the replace or replace all buttons.

Could you change song data with the MM Properties dialog box? What is happening with the database when you click on the Replace button of the RegExp dialog? If your database is changed, but not tags in audio files, I suppose you are turned off the "Update tags when editing properties" option.
Magic Nodes 4.2 (2011-07-01) RegExp Find & Replace 4.3 (2011-07-06)  Invert Selection/Select None 1.5 (2012-02-04)  Export M3Us/Create Playlists for Child Nodes 3.6.1 (2012-01-09)  Expand Child Nodes/Expand All 1.1.1 (2012-02-13)  Event Logger 2.4.1 (2012-02-06)  Filtered Statistics Report 1.5.1 (2009-10-09)  Track Redirection & Synchronization 3.4 (2012-10-08)  Restore/Synchronize Database 3.1.1 (2012-05-31)  Find Currently Playing Track 1.2 (2012-02-14)  Queue List 1.2 (2012-02-06)  Add to Library on Play 1.0 (2010-10-20)  Tree Report for Child Nodes 1.1 (2010-11-04)  Update Location of Files in Database 1.3.3 (2012-06-12)  Inherit Child Playlists 1.0 (2012-01-16)
Add Currently Playing/Selected Track(s) to Playlist 1.1.1 (2012-02-06)
ZvezdanD
 
Posts: 2594
Joined: Thu Jun 08, 2006 7:40 pm

Re: RegExp Find & Replace 3.4 w/ 101 presets (2009-02-21)[MM2+3]

Postby stan9980 » Tue Feb 24, 2009 9:25 pm

Hi ZvezdanD,

I can change the song data with the MM Properties box.

When I click the Replace button nothing happens. The button graphic changes but I don't the progress bar I used to when everything was working. The tags don't change and the db doesn't change.

If I click "Replace all" the progress bar and dialog box both change like I think they did when the script was running successfully (ie find next button stops being greyed out), but only for a split second. The tags don't change and the db doesn't change.

"Update tags when editing properties" option is checked.

A few presets seem to work, I can increment and decrement the play counter with the presets and add "The " to the Artist, but copying the Artist to Original Artist doesn't. I noticed the problem initially when trying to copy Artist to Album Artist. I still can't get that to work, despite the dialog box showing me the correct result.

The only change I can think of is updating the script to 3.4. I can't think of any change I've made anywhere else in MM.

If it would help I'll post examples/screenshots.

Cheers,

stan9980
stan9980
 
Posts: 100
Joined: Tue Nov 06, 2007 6:28 am

Re: RegExp Find & Replace 3.4 w/ 101 presets (2009-02-21)[MM2+3]

Postby ZvezdanD » Wed Feb 25, 2009 5:59 am

stan9980 wrote:The only change I can think of is updating the script to 3.4.

Thanks for the report. There is a new release (3.4.1) with fixed mentioned bug. Unfortunately, the speed up which I tried with the last update could not be implemented, and I needed to revert previous code, sorry about that. :(
Magic Nodes 4.2 (2011-07-01) RegExp Find & Replace 4.3 (2011-07-06)  Invert Selection/Select None 1.5 (2012-02-04)  Export M3Us/Create Playlists for Child Nodes 3.6.1 (2012-01-09)  Expand Child Nodes/Expand All 1.1.1 (2012-02-13)  Event Logger 2.4.1 (2012-02-06)  Filtered Statistics Report 1.5.1 (2009-10-09)  Track Redirection & Synchronization 3.4 (2012-10-08)  Restore/Synchronize Database 3.1.1 (2012-05-31)  Find Currently Playing Track 1.2 (2012-02-14)  Queue List 1.2 (2012-02-06)  Add to Library on Play 1.0 (2010-10-20)  Tree Report for Child Nodes 1.1 (2010-11-04)  Update Location of Files in Database 1.3.3 (2012-06-12)  Inherit Child Playlists 1.0 (2012-01-16)
Add Currently Playing/Selected Track(s) to Playlist 1.1.1 (2012-02-06)
ZvezdanD
 
Posts: 2594
Joined: Thu Jun 08, 2006 7:40 pm

Re: RegExp Find & Replace 3.4 w/ 101 presets (2009-02-25)[MM2+3]

Postby stan9980 » Wed Feb 25, 2009 6:44 am

Thanks for the fix! Works like a charm. It's always been fast enough for me, even with some of the things I've done with this script. :D
stan9980
 
Posts: 100
Joined: Tue Nov 06, 2007 6:28 am

PreviousNext

Return to Need Help with Addons?

Who is online

Users browsing this forum: No registered users and 11 guests