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

Post a reply


In an effort to prevent automatic submissions, we require that you complete the following challenge.
Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Invert Selection/Select None 1.5 (2012-02-04) [MM3+]

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

by ZvezdanD » Sat Feb 21, 2015 1:26 pm

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.

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

by MMFrLife » Sat Feb 21, 2015 12:29 pm

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.

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

by ZvezdanD » Sat Feb 21, 2015 4:43 am

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.

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

by MMFrLife » Wed Feb 18, 2015 9:58 pm

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.

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

by ZvezdanD » Sat Feb 04, 2012 6:35 pm

There is the new update, v1.5 - 2012-02-04
* Improved: speed in many cases;
* Fixed: Select None option [MM4].

Re: Invert Selection/Select None 1.3 (2009-01-18) [MM3]

by ZvezdanD » Sun Jan 18, 2009 6:07 pm

This script was broken with MM 3.1.0.1209-1213, but with 1214 and new script update (1.3) it works really fast. Thanks so much to MM developers for new API functions added to the MM :)

Re: Invert Selection/Select None 1.2 (2009-01-10) [MM3]

by MM3 monkey » Sun Jan 11, 2009 10:44 pm

Thank you, ZvezdanD!

Re: Invert Selection/Select None 1.2 (2009-01-10) [MM3]

by ZvezdanD » Sat Jan 10, 2009 1:15 pm

There is a new update (1.2) of this script - it is much faster with sorted tracklists which contain big number of tracks.

Re: Invert Selection/Select None 1.1.1 [MM3]

by cadmanmeg » Thu Jun 19, 2008 1:56 am

Sorry I haven't had the time to respond, but now, it all seems to work fine with what I tested again. I am using version 3.0.2.1134.

by ZvezdanD » Mon Jun 02, 2008 3:36 pm

I think that I found mentioned bug which leads to a duplicated track. There is a new release (1.1.1).

by ZvezdanD » Sun Jun 01, 2008 7:01 am

cadmanmeg wrote:So I selected 2 tracks and then hovering over one used ctrl-I and then it created a duplicate. Not a duplicate entry physically, but within the dalabase. Is this how this works? Doesn't seem quite right.
Invert selection should do exactly as its name says - to select unselected tracks and vice versa. So, if you have tracklist with, let say, 5 visible tracks and 2 of them which are selected, after press on Ctrl+I there should be selected 3 tracks which previously haven't been selected. If you get different behavior than that, it should be consider as a bug in the script.

Which version of the script and the MM program you are using? Which MM panel you are trying (main tracklist, Now Playing, My Computer...)? Is this panel sorted by any column? Could you send a screenshot?

BTW, this script could not create duplicate in the database, but only in tracklist panel. If you switch to another node in the tree pane and return back to the same node where you previously tried to select tracks, you should see the same number of tracks as before selecting. Actually, this script add one track to traclist to detect which panel is in focus, but immediately after that it remove the same track.

Another possibility for such behavior is that the script wrongly detected that main tracklist has focus and implements old agorythm (from 1.0 version) with RemoveSelectedTracks and AddTracksFromQuery which is much faster than the new one which is applied only on Now Playing pane, My Computer node and unsorted tracklists.

I am sorry, but this happens when we need to use dirty tricks for such trivial things as detecting which panel is in focus and to select/deselect specific tracks.

by cadmanmeg » Sun Jun 01, 2008 3:57 am

So I selected 2 tracks and then hovering over one used ctrl-I and then it created a duplicate. Not a duplicate entry physically, but within the dalabase. Is this how this works? Doesn't seem quite right. Ideas please? Thanks much!

by ZvezdanD » Fri May 30, 2008 12:27 pm

There is an update for this script (1.1). Now it is possible to invert selection in all panes, but please read the Note section.

I need to say, it is extremely ridiculous that we need to write such big scripts for such trivial tasks because of poor API which MM developers gave to us scripters.

by ZvezdanD » Tue May 27, 2008 7:42 am

Now I see that there exist options which could be used to add/remove tracks to Now Playing window instead of mentioned ones, but anyway I don't know how to detect which is active panel through scripting. So, use it with all of this limitations if you wish.

by Bex » Tue May 27, 2008 7:33 am

When you click on the Now Playing Node then the Main Window becames NP_Main_Window. It works differently compared to the normal main window in respect of Right click menus etc...

Btw, Playlists work very strange with this script. Tracks are added to the window but only temporary...

Top