Invert Selection/Select None 1.5 (2012-02-04) [MM3+]

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

Moderators: Peke, Gurus

MMFrLife
Posts: 2894
Joined: Fri Oct 26, 2012 9:04 pm
Location: MM Forum

Re: Invert Selection/Select None 1.5 (2012-02-04) [MM3+]

Post by MMFrLife »

Is it possible to create a script that would allow "various" track selection possibilities?

Like:
1. Selection of every other track starting with the first or second track
2. Selection of any number of tracks after starting at the first or second track before skipping one.

example of 2. would be:
Say, start at the 2nd track and select 2, 3, 4, etc. tracks then skip one and select the next 2, 3, 4, etc.
before skipping another.

Does something like this already exist? ...maybe in REx F&R
I posted here because Invert Selection seemed the closest thing to it even though it doesn't do that.
MM user since 2003 (lifetime lic. 2012) "Trying to imagine life without music gives me a headache"
Top 2 scripts: RegExp Find & Replace (e.v.) and Magic Nodes (e.v.) ZvezdanD's scripts site
Please take a moment to read the bottom of the linked page to support the one and only - ZvezdanD! (the "originator" since 2006).
MMW 4.1.31.1919; 5.0.4.2690 || back it up...frequently!
|| software for power users: "Q-Dir" (free alt. to explorer) and file/folder renamer: "ReNamer" (den4b)
"The absurd is the essential concept and the first truth"
😜
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Re: Invert Selection/Select None 1.5 (2012-02-04) [MM3+]

Post by ZvezdanD »

Of course it is possible to write the script which would select files with some specific pattern. The Invert Selection script is not intended for such purpose and I don't have any plan to extend it in that direction.

The RegExp Find & Replace script could be used to select files with the mentioned patterns, but its use for such task has some drawbacks. First of all, you should select all files on which you want to implement the specific selection pattern before you open the RegExp dialog box. Secondly, you cannot use the hotkey or menu/toolbar command to execute such selection pattern, but you could do that only from the RegExp dialog box using its Select to replace option from the combo box located on the left of the Close button.

Of course, before you chose the mentioned option you should write the appropriate preset which will implement the wanted selection pattern. For example, with the next preset settings you would get selection of every other track:
Find what: ^.*
Regular expression 1: checked
Replace with: IIf(lSongIndex \ 2 = lSongIndex / 2, "$&", "@#$ZvezdanD")
VBScript expression: checked

The field selected in the Into combo box is not important because you don't want to do any actual replacement, but you should be maximally careful to not click the Replace or Replace All buttons with such preset, but you should choose the mentioned Select to replace option instead.

The new, unpublished version has implemented the additional options which eliminate some of the mentioned drawbacks:
- you could choose which operation will be executed with some preset initiated by its hotkey or menu/toolbar command (until now it was only Replace, but it is now possible to choose the other commands from the mentioned combo box as well, i.e. Keep Matched, Select Matched, Select to Replace...);
- you could select VBScript expression for the searching field, i.e. field on which is applied Find what string (until now it was possible to select VBScript expression only on the replacing string);
- you could switch roles for Into and From combo boxes which allows to search for one field and replace value in some another field (the current version allows only to replace value of the same field that is searching).

So, with the new version you could write the preset which could be used only for selecting files, but not for their replacements. However, even with that version the first drawback stays, i.e. you should first select all files on which you want to implement the wanted selection pattern.
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
MMFrLife
Posts: 2894
Joined: Fri Oct 26, 2012 9:04 pm
Location: MM Forum

Re: Invert Selection/Select None 1.5 (2012-02-04) [MM3+]

Post by MMFrLife »

Thanks, I think I sorta know some of what you are saying, and you probably already said it in "one" way of saying it, but just to be clear
in the way that I need to say it:

All I want is to be able to select files based on a pattern "without" having to "manually" select them.
If I then want to delete those selected files, I could "manually" do it. I don't need the aid of a script for that part.

I want to do this to deal with deleting non-greyed out duplicates (same titles, same path).
MM doesn't have this built in because of the understandable fear of being responsible for deleting the wrong files in
a person's collection. I figured this way a person would have to do it themselves but only have to glance through a few groups of files at a time,
"eye" the pattern, then set it to every other one or skip then two, three, four, etc. skip again..... > right click > remove.
MM user since 2003 (lifetime lic. 2012) "Trying to imagine life without music gives me a headache"
Top 2 scripts: RegExp Find & Replace (e.v.) and Magic Nodes (e.v.) ZvezdanD's scripts site
Please take a moment to read the bottom of the linked page to support the one and only - ZvezdanD! (the "originator" since 2006).
MMW 4.1.31.1919; 5.0.4.2690 || back it up...frequently!
|| software for power users: "Q-Dir" (free alt. to explorer) and file/folder renamer: "ReNamer" (den4b)
"The absurd is the essential concept and the first truth"
😜
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Re: Invert Selection/Select None 1.5 (2012-02-04) [MM3+]

Post by ZvezdanD »

The RegExp Find and Replace presets could be applied only on selected files. Or, with the latest available version of the add-on, the presets could be applied on all files visible in the main filelist if none file is selected. The new version has removed that possibility to apply some preset on all visible files when none file is selected because that could lead to some unwanted replacements.

So, if it is still not clear what that means, here is one example. Let say that the main filelist contains 10 files. If I want to get selected every another file (1, 3, 5, 7 and 9) I need first to select all files in the main filelist with the Ctrl+A hotkey or using the Select All command from the Edit menu, then I should open the RegExp Find & Replace dialog box and apply the described preset using Select to replace option.

If you forget to select all files in the main filelist before you open the RegExp dialog box, you don't need to close that dialog to be able to apply the Select All command since that dialog box has one not-so-obvious possibility. The rectangle in the bottom left corner on the left side of the Find Next button which displays the number of files could be used to toggle between selected and all visible files on which you could apply the selected preset.

The second thing worth mentioning is the possibility to make the RegExp dialog box modeless in which case you could use the other commands from the program while that dialog is still opened. To be able to do that you need to turn on the "Modeless Find & Replace dialog box" option in the Options dialog box. If you also turn on the "Display of tracks in Find & Replace dialog box with main window" option then you will be able to select/deselect files in the main filelist while the RegExp dialog box is still opened and such selection will be automatically updated in the table on that dialog box as well.
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