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

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

Moderators: Peke, Gurus

CarlitoGil
Posts: 294
Joined: Sun Sep 07, 2008 10:46 am
Location: Dominican Republic
Contact:

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

Post by CarlitoGil »

Oops, wrote that too fast
Meant something like this

Code: Select all

Function IIfx(expr, truepart, falsepart)
    If expr Then
        IIfx = truepart
    Else
        IIfx = falsepart
    End If
    IIfx = Eval(IIfx)
End Function
to be called like this

Code: Select all

IIfx(1=0,"SetVariable(0,999)","SetVariable(0,666)")
But scratch that too, Now I don't think is worth it.
I'll just watch out for it, hehe
iTunesMonkey + Acoustid – Find metadata from iTunes and Acoustid
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

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

Post by ZvezdanD »

Well, maybe you are right. Why don't you add that function to the script and try by yourself?

By the way, you could also try the next expression using the existing IIf function:

Code: Select all

Eval(IIf(1=0, "SetVariable(0,999)", "SetVariable(0,666)"))
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.8 / 4.0.1  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
Guest

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

Post by Guest »

Hi Zvezdan,

one suggestion to your wonderful script:
When accompanying files are being moved after deleting emptied folders in some presets - would it be possible to add another button "Move all" to avoid confirming it for every folder?

Thanks and best regards
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

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

Post by ZvezdanD »

Guest wrote:When accompanying files are being moved after deleting emptied folders in some presets - would it be possible to add another button "Move all" to avoid confirming it for every folder?
This is already reported: http://www.mediamonkey.com/forum/viewto ... 65#p206465

Unfortunately, this is default behavior of MediaMonkey itself and cannot be done to much. I reported this to MM developers (http://www.ventismedia.com/mantis/view.php?id=5782), but I doubt they would change anything in regard to this.

By the way, I think you are using some old version of program. It had such behavior with confirmation dialog boxes until 1251, after that build they are not displayed at all, i.e. all accompanying files are not moved but stay in same folders as before of moving tracks. :(
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.8 / 4.0.1  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
CarlitoGil
Posts: 294
Joined: Sun Sep 07, 2008 10:46 am
Location: Dominican Republic
Contact:

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

Post by CarlitoGil »

ZvezdanD wrote:after that build they are not displayed at all, i.e. all accompanying files are not moved but stay in same folders as before of moving tracks. :(
Oh, hadn't notice that
It's better
Is it possible to add an preemptive option to move everything or none at all?
iTunesMonkey + Acoustid – Find metadata from iTunes and Acoustid
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

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

Post by ZvezdanD »

GIL wrote:Is it possible to add an preemptive option to move everything or none at all?
I could add something like that, but it could be too complicated and I would rather wait for MM developers to add same thing. This script is mainly intended for tag manipulations and I don't like to mess with manipulation of files more than it is allowed using SongData object and its Path property.

However, maybe I could change my mind and add the mentioned option like I did with the option for deleting of emptied folders which I didn't want to add at first.
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.8 / 4.0.1  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

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

Post by nynaevelan »

Z:

Would it be possible to add the SongID field in order to be used in the 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
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

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

Post by ZvezdanD »

nynaevelan wrote:Would it be possible to add the SongID field in order to be used in the script??
You could use oSongData.ID or oSongData.SongID inside of the VBScript expression, i.e. inside of the replacement string (I really don't know what is a difference between those two fields since they are returning same value). However, you cannot modify that field using this script. Well, I could add such possibility, but I am not sure why someone would want to change ID.
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.8 / 4.0.1  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

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

Post by nynaevelan »

I do not want to modfy the field, I actually want to set up a preset to copy the songid into one of the custom fields.

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
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

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

Post by ZvezdanD »

nynaevelan wrote:I actually want to set up a preset to copy the songid into one of the custom fields.
Yes, this is possible. Here are settings:
Find what: ^.*
Into: Custom 1
RegExp 1: checked
Replace with: oSongData.ID
VBScript: checked
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.8 / 4.0.1  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

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

Post by nynaevelan »

ZvezdanD wrote:
nynaevelan wrote:I actually want to set up a preset to copy the songid into one of the custom fields.
Yes, this is possible. Here are settings:
Find what: ^.*
Into: Custom 1
RegExp 1: checked
Replace with: oSongData.ID
VBScript: checked
Thank you, once again you've come through for me, I do not know what I would do without you scripters and skinners, to think I used to be satisfied with my Musicmatch library!! Now I am off to the Magic Nodes script for some help with a node to identify the ones I need to fix. :wink:

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
Diabolic-Destiny
Posts: 223
Joined: Sun Apr 29, 2007 9:45 pm

Re: RegExp Find & Replace 3.5 w/ 101 presets (2009-06-18)[MM2+3]

Post by Diabolic-Destiny »

ZvezdanD wrote:
mk1065 wrote:Anyone know how I could put all my featured artists in paranthesis. For example:

Find what - ft. Easy E
Replace with - (ft. Easy E)
Find what:

Code: Select all

\b(?:ft\.?|feat\.?|featuring|vs\.?|versus|pres\.?|presents)\s.*[^)]$
Into: Artist
Regular expression 1: checked
Replace with:

Code: Select all

($&)
I was using this and it works great. However i was wondering if I can make it a lil more specific which i believe would lead it to be a bit more complicated.

For example i have

title ft. artist remix

I wanna make it Title [Ft. artist] [Remix]

how would i go about doing that? and if its a regular

title ft artist to make it title [Ft. artist]

I know I would need an if command but iuno if its actually possible to even combine those two, because what im trying to do is have 1 giant regexp to run through my whole library because i also wanna change any round brackets in the title "() to square brackets as well "[]"
Image
Image
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Re: RegExp Find & Replace 3.5 w/ 101 presets (2009-06-18)[MM2+3]

Post by ZvezdanD »

Diabolic-Destiny wrote:I wanna make it Title [Ft. artist] [Remix]
Find what:

Code: Select all

\b(?:ft\.?|feat\.?|featuring|vs\.?|versus|pres\.?|presents)\s.*[^\]]$
RegExp1: checked
Replace with:

Code: Select all

IIf(Len(RegExp("$&", "remix$", 0)) > 0, RegSub("$&", "(\b(?:ft\.?|feat\.?|featuring|vs\.?|versus|pres\.?|presents)\s.*)\s(remix)$", "[$$1] [$$2]"), RegSub("$&", "\b(?:ft\.?|feat\.?|featuring|vs\.?|versus|pres\.?|presents)\s.*[^\]]$", "[$$&]"))
VBScript: checked
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.8 / 4.0.1  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
Diabolic-Destiny
Posts: 223
Joined: Sun Apr 29, 2007 9:45 pm

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

Post by Diabolic-Destiny »

when i try that i get that whole expression in the title field... strange i have reg1 checked
Image
Image
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

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

Post by ZvezdanD »

Have you checked the VBScript expression too?
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.8 / 4.0.1  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
Post Reply