Page 1 of 1
Script and Keyboard Shortcut Doesn't Work in Search Results
Posted: 06 Oct 2011 22:35
by Jerry
I have a script for normalizing selected file names. The script and associated keyboard shortcut work fine with selected files in any regular tab. But for some reason, in the Search Results tab, the keyboard shortcut doesn't work at all and when I try to run the script directly (via User/Run Script), it only acts on one of the multiple selected files.
The search I did is a Regexp "mp3$" on a top level folder containing the mp3 files in 3 sub-folders. I select all the files and then try to run the script shown below: (My keyboard shortcut is Shift-Alt-C.)
Code: Select all
rename s, "_/ ";
rename r, "(\w)-(\w) > $1 - $2";
rename r, "^(\d+)\s+(\w) > $1 - $2";
#126;
Using 10.40.0000. I don't know if this is a new problem or not, because this is the first time I ran the script this way and noticed the problem.
Re: Script and Keyboard Shortcut Doesn't Work in Search Resu
Posted: 07 Oct 2011 08:23
by admin
Confirmed. It's not really a bug but the fact the multiple selections were lost after each special rename (nothing to do directly with scripting).
I could improve it as follows:
Code: Select all
* Rename Special: Before, when renaming multiple items in Search
Results, the search was repeated after the rename and the multi-
selections were lost. Now, this happens only when folders are
among the renamed items AND the search did include subfolders.
If multiple folders are renamed in a recursive Search Results list then updating the list data while retaining the selections becomes pretty complex. I'll look at it again somewhen later...
Re: Script and Keyboard Shortcut Doesn't Work in Search Resu
Posted: 07 Oct 2011 19:55
by Jerry
Ok, and I see now that the reason my Shift-Alt-C shortcut doesn't work is because Alt-C is an accelerator for the
Selected locations checkbox in the Find Files/Names & Location panel.
But, 3 questions:
- Why does the search still repeat in this way when Auto-Refresh is temporarily turned off (from the View Menu)?
- Why can't the Suspend Auto-Refresh option be toggled off (when Auto-Refresh is still on globally) when in the Search Results tab?
- Why is the right click context menu restricted to a subset of the items in the regular context menu. Particularly, items I use for external programs don't show up.
Re: Script and Keyboard Shortcut Doesn't Work in Search Resu
Posted: 07 Oct 2011 20:10
by admin
Jerry wrote:Ok, and I see now that the reason my Shift-Alt-C shortcut doesn't work is because Alt-C is an accelerator for the
Selected locations checkbox in the Find Files/Names & Location panel.
But, 3 questions:
- Why does the search still repeat in this way when Auto-Refresh is temporarily turned off (from the View Menu)?
- Why can't the Suspend Auto-Refresh option be toggled off (when Auto-Refresh is still on globally) when in the Search Results tab?
- Why is the right click context menu restricted to a subset of the items in the regular context menu. Particularly, items I use for external programs don't show up.
1. It's a an internal refresh, not an auto-refresh.
2. Search Results don't auto-refresh. It's a design decision from years ago.
3. The context menu does not work correctly for items from multiple locations. It's THE mystery of all mysteries and I could never solve it in 14 years. I know that xplorer2 has solved it, but the solution is such a frightening hack that I did not dare to try it.

Re: Script and Keyboard Shortcut Doesn't Work in Search Resu
Posted: 07 Oct 2011 20:18
by Jerry
admin wrote:Jerry wrote: I know that xplorer2 has solved it, but the solution is such a frightening hack that I did not dare to try it.

Oh, are you writing xyplorer2 in a different language and platform and if so, what is that?
Re: Script and Keyboard Shortcut Doesn't Work in Search Resu
Posted: 07 Oct 2011 20:20
by admin
Jerry wrote:admin wrote:Jerry wrote: I know that xplorer2 has solved it, but the solution is such a frightening hack that I did not dare to try it.

Oh, are you writing xyplorer2 in a different language and platform and if so, what is that?
No, not xyplorer2 but xplorer2 , it's another file manager.

Re: Script and Keyboard Shortcut Doesn't Work in Search Resu
Posted: 07 Oct 2011 20:47
by Jerry
Just tried things with the 10.40.0005 beta and the script now works fine. Thanks.