Page 11 of 109
Re: RegExp Find & Replace 2.2.2 - with 50 presets [MM2+3]
Posted: Sat Dec 06, 2008 4:17 am
by FEB
ZvezdanD wrote:FEB wrote:I'd like to move all entries in the 'Publisher' section to 'Custom 2'
Just take a look at the "Copy the Date when the file is created to the Date added field" preset and choose wanted fields from
Into and
From dropdown lists. After copying, if you want to delete Publisher field, you could use the "Clear the Comment field" preset with changed field in the
Into dropdown list.
Well, that's just brilliant, Z, thanks a lot! To complete it, I need to change 'Custom 2' to read 'Publisher' in the now playing pane. I'm sure it's easy to do, I just don't know how.
edit: found it - my collection is complete!
Super stuff, thanks again!
Re: RegExp Find & Replace 2.2.2 - with 50 presets [MM2+3]
Posted: Sat Dec 06, 2008 5:05 am
by FEB
One thing to note, and perhaps you might want to put some sort of change in, but when I edited 'Custom 2' to read 'Label', neither RegExp or Magic Nodes would start. Presumably the vbs script expicitly calls 'Custom 2'.
Hope this helps...
Re: RegExp Find & Replace 2.2.2 - with 50 presets [MM2+3]
Posted: Thu Dec 11, 2008 11:29 am
by DeathAxe
Suggestion for performance boost
Scenario:
1. I select a list of 5000 songs, which I want to replace the ´ by ' (Actually maybe 100 songs have the ´ and the rest is clean.)
2. I start RegExpReplace with those 5000 songs.
3. I press "replace all" button and RegExpReplace starts to alter EACH song's id3tag which may take a long long time to go, even though only 100 files would need update!
My suggestion is to check first if an item/song is to be changed and only update those ones. Leaving all noninteresting files (not containing the ´) as is, would increase the speed of replacement very much.
Re: RegExp Find & Replace 2.2.2 - with 50 presets [MM2+3]
Posted: Thu Dec 11, 2008 12:36 pm
by ZvezdanD
FEB wrote:when I edited 'Custom 2' to read 'Label', neither RegExp or Magic Nodes would start.
I am not sure that understand. I just renamed "Custom 2" field in the Options dialog to "Label", restarted MM and both Magic Nodes and RegExp works fine and RegExp even display "Label" instead of "Custom 2" in the
Into and
From dropdown lists. Could you tell me what exactly is happening to you?
Re: RegExp Find & Replace 2.2.2 - with 50 presets [MM2+3]
Posted: Thu Dec 11, 2008 12:41 pm
by ZvezdanD
DeathAxe wrote:My suggestion is to check first if an item/song is to be changed and only update those ones.
Thanks for suggestion, but this script already works like that. If you take a look on the source code you would see such check in its main function ReplaceSongData in the line 3009:
Code: Select all
If CStr(sAfter) <> CStr(sBefore) Then
Re: RegExp Find & Replace 2.2.2 - with 50 presets [MM2+3]
Posted: Fri Dec 12, 2008 2:58 pm
by mysticalgrooves
How do i go about in configuring this function?
I want to swap the values in the disc number field with the track number field.
Re: RegExp Find & Replace 2.2.2 - with 50 presets [MM2+3]
Posted: Fri Dec 12, 2008 6:45 pm
by ZvezdanD
mysticalgrooves wrote:I want to swap the values in the disc number field with the track number field.
This script could be used only for modifications of one field at time, but swapping should be applied on two fields in same time. Actually, you could swap two fields using three presets, but it is better to use Steegy's
script for such thing.
Issues with none released objects causing memory leaks.
Posted: Sun Dec 14, 2008 8:44 am
by DeathAxe
Hi, I am not an expert in VisualBasic, but I think you have to release/delete objects created with the new operator just like it has to be done in C++?!
In function RegExp(sExpr, sPattern, lItem) you create an object for RegExp by Set RE2 = New RegExp. This means you must add a line called RE2 = Nothing at the end of this function. Otherwise the object is not deleted what is simply causing a memory leak. The same issue can be found in several other functions of your code!
Please fix your memory leaks!
Re: Issues with none released objects causing memory leaks.
Posted: Sun Dec 14, 2008 1:08 pm
by ZvezdanD
DeathAxe wrote:I am not an expert in VisualBasic,
Please fix your memory leaks!
Please check your suggestions before you attack me

VBscript (as well as Visual Basic) don't need to manually release objects at the procedure end - they are automatically removed from memory.
Re: RegExp Find & Replace 2.2.2 - with 50 presets [MM2+3]
Posted: Sun Dec 14, 2008 5:43 pm
by declan
I've downloaded the installer. I open MM as an adminsitrator (I'm using Vista) then I click on the installer and the installer opens a second mm, which isn't being run as administrator so the installation fails. How do I get around this?
Re: RegExp Find & Replace 2.2.2 - with 50 presets [MM2+3]
Posted: Sun Dec 14, 2008 6:11 pm
by ZvezdanD
declan wrote:I've downloaded the installer. I open MM as an adminsitrator (I'm using Vista) then I click on the installer and the installer opens a second mm, which isn't being run as administrator so the installation fails. How do I get around this?
Well, you could temporarily turn on the option Tools / Options / General / Allow just one instance of MediaMonkey.
Re: RegExp Find & Replace 2.2.2 - with 50 presets [MM2+3]
Posted: Sun Dec 14, 2008 6:29 pm
by declan
Well I got it to install by following the MM2 method turning it into a zip file and dragging into the Auto file.
But the problem that got me to re-install in the first place persists. Basically, the masks have gone mental and now look like this -
"Remove trailing/leading spaces from the Title", " Another Brick in the Wall -> Another Brick in the Wall", ", "^(\s*)(.*?)(\s*)$", "Title", "True", "False", "$2", "Title", "False", "False", "False"
Is this going to be connected to installing the latest Beta version on MM?
Re: RegExp Find & Replace 2.2.2 - with 50 presets [MM2+3]
Posted: Mon Dec 15, 2008 9:46 am
by ZvezdanD
declan wrote:Is this going to be connected to installing the latest Beta version on MM?
This script works fine with MM 3.1. Presets are stored in the MediaMonkey.ini file as your example indeed and they have nothing in common with Magic Nodes masks (I think this is what you expected). If you look at RegExpReplace.ini in Auto folder you would see same form of presets.
Have you tried my suggestion with the option "Allow just one instance "?
Re: RegExp Find & Replace 2.2.2 - with 50 presets [MM2+3]
Posted: Mon Dec 15, 2008 2:33 pm
by declan
That's not what I'm saying.
What happened is -
1. I used this script prior to upgrading to 3.1
2. I used it after the upgrading
3. But the masks became corrupted, so they now look like this...
The reinstall issue arose because I tried to fix it by reinstalling but the error predated it.
Re: RegExp Find & Replace 2.2.2 - with 50 presets [MM2+3]
Posted: Mon Dec 15, 2008 7:15 pm
by ZvezdanD
declan wrote:the masks became corrupted
Sorry, you confused me because you mentioned masks. In the RegExp I am calling them presets, but Magic Nodes masks are somehow indeed corrupted with your RegExp presets, as you could see them in the Preset dropdown list. I don't think this is related with the installation of the new version of MM, but have no idea what is a reason. Only thing I could suggest is to uninstall both scripts, when the scipt asks if you want to remove its settings you should choose Yes and try to install them again. If this cannot help, you could always manually edit MediaMonkey.ini file - just remove RegExpPresets and/or CustomNodeMasks sections from it. If you have XP, this .ini file is in c:\Documents and Settings\your_username\Local Settings\Application Data\MediaMonkey\. Of course, after that you would loose all your MN masks and RegExp presets, but I suppose you already have backup of them.