Search & Replace Strings - dropdown MRU ??
-
Papoulka
- Posts: 455
- Joined: 13 Jul 2013 23:41
Search & Replace Strings - dropdown MRU ??
.
I use "File | Rename Special | Search and Replace" which brings up a one-line dialog box entitled "Search and Replace Strings". This has a dropdown selector which looks like it should be a MRU list, but it doesn't drop down, evidently because it has no contents to offer. In fact it presently seems to do nothing.
I'd like this dropdown to remember the last ten or dozen strings / replacements.
Thx
I use "File | Rename Special | Search and Replace" which brings up a one-line dialog box entitled "Search and Replace Strings". This has a dropdown selector which looks like it should be a MRU list, but it doesn't drop down, evidently because it has no contents to offer. In fact it presently seems to do nothing.
I'd like this dropdown to remember the last ten or dozen strings / replacements.
Thx
-
highend
- Posts: 14950
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Search & Replace Strings - dropdown MRU ??
It works perfectly fine for me.
[mruSearchReplace]
contains all remembered patterns (stored in the XYplorer.ini file).
Ofc the settings must be saved if they need to be retained...
[mruSearchReplace]
contains all remembered patterns (stored in the XYplorer.ini file).
Ofc the settings must be saved if they need to be retained...
One of my scripts helped you out? Please donate via Paypal
-
Papoulka
- Posts: 455
- Joined: 13 Jul 2013 23:41
Re: Search & Replace Strings - dropdown MRU ??
Thanks, highend.
More info: On the Configuration menu I have checkmarked "Save Settings on Exit" and "Save MRU Lists on Exit". In XYplorer.ini I have "SaveMRULists=1".
The following MRUs do work while XY is open and are saved in the ini file when I exit from XY: [mruBrowse], [mruOpenedItems], [mruSelectionFilter], [mruBatchRename], and [mruGoto].
But [mruSearchReplace] does not work and no entries for it are saved in the ini. The section header is there, but no entries; just a count of 0.
So, somehow I have broken it. Now, I have edited my ini file a few times and might have damaged something, but if so this is the only symptom of it.
Any ideas from the forum appreciated.
More info: On the Configuration menu I have checkmarked "Save Settings on Exit" and "Save MRU Lists on Exit". In XYplorer.ini I have "SaveMRULists=1".
The following MRUs do work while XY is open and are saved in the ini file when I exit from XY: [mruBrowse], [mruOpenedItems], [mruSelectionFilter], [mruBatchRename], and [mruGoto].
But [mruSearchReplace] does not work and no entries for it are saved in the ini. The section header is there, but no entries; just a count of 0.
So, somehow I have broken it. Now, I have edited my ini file a few times and might have damaged something, but if so this is the only symptom of it.
Any ideas from the forum appreciated.
-
bdeshi
- Posts: 4256
- Joined: 12 Mar 2014 17:27
- Location: Asteroid B-612
- Contact:
Re: Search & Replace Strings - dropdown MRU ??
Does the dropdown list become empty only after restart?
or is it never populated at all?
Do a few search&replace renames, then check the droplist in the same XY session.
========
moved topic: Wishes->QA
or is it never populated at all?
Do a few search&replace renames, then check the droplist in the same XY session.
========
moved topic: Wishes->QA
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
-
Papoulka
- Posts: 455
- Joined: 13 Jul 2013 23:41
Re: Search & Replace Strings - dropdown MRU ??
After many starts and stops and examinations of the ini file, the feature suddenly started working. So I'll let it go for now. I did learn more about what to look for if it starts doing this again.
Thx
Thx
-
Papoulka
- Posts: 455
- Joined: 13 Jul 2013 23:41
Re: Search & Replace Strings - dropdown MRU ??
Time to revisit this again because it still seems broken and I really could use this feature...
I am running ver 14.60.000; I have checkmarked both of these in "Startup & Exit": "Save settings on exit" and "Include most-recently-used lists on save". In XYplorer.ini I see SaveMRULists=1.
--> The symptom is that when I use "Search & Replace" and actually make a string replacement in a filename, things do NOT happen that apparently should, in XYplorer.ini:
1) If XY is still open, the search/replace string is never added to section [mruSearchReplace]. That is, XYplorer.ini is not immediately updated to add this string. Therefore I have no current / recent "mru" while actively working in XY.
2) When I exit XY, the search/replace string is sometimes added to [mruSearchReplace], but equally often it appears instead in [RenameSpecial] as the value for "RemoveParticularCharacter".
3) When something does get saved, it's only one or at most two entries. I can use S&R fifty times without anything being saved other than (sometimes) the last string used. Even that is rare.
I'm surprised that others don't have similar problems because there seems to be little that could fail. XY is clearly using and writing to the correct .ini file, and sometimes gets it right. Why would it ever get it wrong?
I think this should be moved to the "Bugs" forum, if anyone can do that.
Thx
I am running ver 14.60.000; I have checkmarked both of these in "Startup & Exit": "Save settings on exit" and "Include most-recently-used lists on save". In XYplorer.ini I see SaveMRULists=1.
--> The symptom is that when I use "Search & Replace" and actually make a string replacement in a filename, things do NOT happen that apparently should, in XYplorer.ini:
1) If XY is still open, the search/replace string is never added to section [mruSearchReplace]. That is, XYplorer.ini is not immediately updated to add this string. Therefore I have no current / recent "mru" while actively working in XY.
2) When I exit XY, the search/replace string is sometimes added to [mruSearchReplace], but equally often it appears instead in [RenameSpecial] as the value for "RemoveParticularCharacter".
3) When something does get saved, it's only one or at most two entries. I can use S&R fifty times without anything being saved other than (sometimes) the last string used. Even that is rare.
I'm surprised that others don't have similar problems because there seems to be little that could fail. XY is clearly using and writing to the correct .ini file, and sometimes gets it right. Why would it ever get it wrong?
I think this should be moved to the "Bugs" forum, if anyone can do that.
Thx
-
bdeshi
- Posts: 4256
- Joined: 12 Mar 2014 17:27
- Location: Asteroid B-612
- Contact:
Re: Search & Replace Strings - dropdown MRU ??
You say you've ticked "Include most-recently-used lists on save".
DID YOU ALSO click the adjacent "Apply To" button and tick at least "Rename Special"? (Usually usefully all of those should be ticked)
DID YOU ALSO click the adjacent "Apply To" button and tick at least "Rename Special"? (Usually usefully all of those should be ticked)
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
-
Papoulka
- Posts: 455
- Joined: 13 Jul 2013 23:41
Re: Search & Replace Strings - dropdown MRU ??
Yes, in the "Apply To" box all entries are checkmarked. I think this is the default and I have never changed it.
So - does this MRU work as advertised for everyone else??
So - does this MRU work as advertised for everyone else??
-
Papoulka
- Posts: 455
- Joined: 13 Jul 2013 23:41
Re: Search & Replace Strings - dropdown MRU ??
OK - never mind everyone else. Does Search & Replace MRU work for anyone else?
-
bdeshi
- Posts: 4256
- Joined: 12 Mar 2014 17:27
- Location: Asteroid B-612
- Contact:
Re: Search & Replace Strings - dropdown MRU ??
I should think yours is the only exception.
btw,
btw,
if you enter search/rename patterns like "abcde" without any replacement strings, it's saved in [RenameSpecial]. But still that pattern does get added to [mruSearchReplace] and corresponding dropdown.Papoulka wrote:the search/replace string is sometimes added to [mruSearchReplace], but equally often it appears instead in [RenameSpecial] as the value for "RemoveParticularCharacter".
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
-
Papoulka
- Posts: 455
- Joined: 13 Jul 2013 23:41
Re: Search & Replace Strings - dropdown MRU ??
Reviving this because I still think there's a bug. And I think it's related directly to using a custom toolbar button to call the S&R function.
My custom button has for "script to run on left-click": #123;//search & replace
Test scenario:
1) I start with a new default vanilla install of XYplorer. The first time it runs it creates XYplorer.ini.
2) I copy my custom button info from my old INI into this new one. That's all - no MRUs or MRU counts etc.
3) Manual use of "File | RenameSpecial | Search & Replace" works fine, creating and and maintaining its MRU. BUT if I run S&R from the custom button, the MRU is no longer maintained. New entries are not placed on it. When I go back to manual use, the MRU works again.
The same is true for "File | RenameSpecial | RegExp Rename". Its MRU works fine with manual usage but not if I invoke the function via a custom button programmed as: #122;//RexExp Rename
It's odd that calling the function one way or another would affect its MRU, but that's what's happening, and it's why the behavior was initially so baffling.
--> Can anyone replicate this?
If it's not related to invoking the function using a custom button, then it must be because I have 14 or so custom buttons defined. That seems very unlikely but it's the only way my test setup differs from a default XY installation.
Thx
My custom button has for "script to run on left-click": #123;//search & replace
Test scenario:
1) I start with a new default vanilla install of XYplorer. The first time it runs it creates XYplorer.ini.
2) I copy my custom button info from my old INI into this new one. That's all - no MRUs or MRU counts etc.
3) Manual use of "File | RenameSpecial | Search & Replace" works fine, creating and and maintaining its MRU. BUT if I run S&R from the custom button, the MRU is no longer maintained. New entries are not placed on it. When I go back to manual use, the MRU works again.
The same is true for "File | RenameSpecial | RegExp Rename". Its MRU works fine with manual usage but not if I invoke the function via a custom button programmed as: #122;//RexExp Rename
It's odd that calling the function one way or another would affect its MRU, but that's what's happening, and it's why the behavior was initially so baffling.
--> Can anyone replicate this?
If it's not related to invoking the function using a custom button, then it must be because I have 14 or so custom buttons defined. That seems very unlikely but it's the only way my test setup differs from a default XY installation.
Thx
-
bdeshi
- Posts: 4256
- Joined: 12 Mar 2014 17:27
- Location: Asteroid B-612
- Contact:
Re: Search & Replace Strings - dropdown MRU ??
can you post the CTB script? [open CTB editor for that button, Right-click "Clear" -> Copy as snippet]
can't confirm on a fresh XY v14.80.0233
can't confirm on a fresh XY v14.80.0233
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
-
Papoulka
- Posts: 455
- Joined: 13 Jul 2013 23:41
Re: Search & Replace Strings - dropdown MRU ??
Sammay
Below is the snippet for the CTBs I mentioned. And with more experimentation I can reduce the problem to the following:
1) Make fresh install of XY; I used 14.80.0233
2) Create new toolbar button for Search & Replace using script: #123;
2) Use manual File | Rename Special | Search & Replace a few times; this builds the MRU
3) Use new S&R toolbar button a few times; MRU will no longer grow
That's the problem I have, and I'd be surprised if it doesn't work the same for you.
==============================
Below is the snippet for the CTBs I mentioned. And with more experimentation I can reduce the problem to the following:
1) Make fresh install of XY; I used 14.80.0233
2) Create new toolbar button for Search & Replace using script: #123;
2) Use manual File | Rename Special | Search & Replace a few times; this builds the MRU
3) Use new S&R toolbar button a few times; MRU will no longer grow
That's the problem I have, and I'd be surprised if it doesn't work the same for you.
==============================
Code: Select all
Snip: CTB 1
XYplorer 14.80.0233, 2/13/2015 6:47:15 AM
Action
NewUserButton
Name
Search and Replace
Icon
C:\XYplorer_p\Data\Icons\R1.ICO
ScriptL
#123; //search & replace
ScriptR
FireClick
0
-
bdeshi
- Posts: 4256
- Joined: 12 Mar 2014 17:27
- Location: Asteroid B-612
- Contact:
Re: Search & Replace Strings - dropdown MRU ??
Right. Confirmed.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
-
admin
- Site Admin
- Posts: 66323
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Search & Replace Strings - dropdown MRU ??
Because:
Code: Select all
v7.90.0078 - 2009-01-27 21:16
* MRUs: Now, patterns from the following commands are not added to
the command's MRU list anymore when triggered via scripting:
VisualFilter (::filter)
BatchRename (::rename "b")
RegExpRename (::rename "r")
SearchReplace (::rename "s")
KeepParticularChars (::rename "k")
FAQ | XY News RSS | XY X
XYplorer Beta Club