Page 26 of 109
Re: RegExp Find & Replace 3.6 w/ 101 presets (2009-07-02)[MM2+3]
Posted: Fri Aug 14, 2009 12:46 pm
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
Re: RegExp Find & Replace 3.6 w/ 101 presets (2009-07-02)[MM2+3]
Posted: Fri Aug 14, 2009 1:01 pm
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)"))
Re: RegExp Find & Replace 3.6 w/ 101 presets (2009-07-02)[MM2+3]
Posted: Wed Aug 19, 2009 3:00 pm
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
Re: RegExp Find & Replace 3.6 w/ 101 presets (2009-07-02)[MM2+3]
Posted: Fri Aug 21, 2009 12:25 pm
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.

Re: RegExp Find & Replace 3.6 w/ 101 presets (2009-07-02)[MM2+3]
Posted: Fri Aug 21, 2009 3:14 pm
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?
Re: RegExp Find & Replace 3.6 w/ 101 presets (2009-07-02)[MM2+3]
Posted: Fri Aug 21, 2009 3:46 pm
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.
Re: RegExp Find & Replace 3.6 w/ 101 presets (2009-07-02)[MM2+3]
Posted: Fri Aug 21, 2009 4:34 pm
by nynaevelan
Z:
Would it be possible to add the SongID field in order to be used in the script??
Nyn
Re: RegExp Find & Replace 3.6 w/ 101 presets (2009-07-02)[MM2+3]
Posted: Fri Aug 21, 2009 4:47 pm
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.
Re: RegExp Find & Replace 3.6 w/ 101 presets (2009-07-02)[MM2+3]
Posted: Fri Aug 21, 2009 5:18 pm
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
Re: RegExp Find & Replace 3.6 w/ 101 presets (2009-07-02)[MM2+3]
Posted: Fri Aug 21, 2009 5:25 pm
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
Re: RegExp Find & Replace 3.6 w/ 101 presets (2009-07-02)[MM2+3]
Posted: Fri Aug 21, 2009 5:30 pm
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.
Nyn
Re: RegExp Find & Replace 3.5 w/ 101 presets (2009-06-18)[MM2+3]
Posted: Thu Aug 27, 2009 6:31 pm
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:
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 "[]"
Re: RegExp Find & Replace 3.5 w/ 101 presets (2009-06-18)[MM2+3]
Posted: Fri Aug 28, 2009 12:36 pm
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
Re: RegExp Find & Replace 3.6 w/ 101 presets (2009-07-02)[MM2+3]
Posted: Fri Aug 28, 2009 6:17 pm
by Diabolic-Destiny
when i try that i get that whole expression in the title field... strange i have reg1 checked
Re: RegExp Find & Replace 3.6 w/ 101 presets (2009-07-02)[MM2+3]
Posted: Sat Aug 29, 2009 12:58 am
by ZvezdanD
Have you checked the VBScript expression too?