Column Mode Editing in "Edit Item Names" dialog

Features wanted...
JLoftus
Posts: 577
Joined: 22 Jan 2014 14:58

Column Mode Editing in "Edit Item Names" dialog

Post by JLoftus »

I'd like to use Column Mode Editing in the "Edit Item Names" dialog as possible in some editors such as UltraEdit, see description here:
http://www.ultraedit.com/products/uestu ... iting.html

If you have a list files in the Edit Item Names dialog (from Rename Special menu) it would be great to hold down the alt key while selecting, so you get column mode. This would allow rapid vertical cutting of filenames, such as:
temp.png
temp.png (9.3 KiB) Viewed 3861 times
You could then press the delete key and "slice" a section from a long list of filenames very quickly.

Any possibility for getting this in the future?

Thanks!

Jeff

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Column Mode Editing in "Edit Item Names" dialog

Post by admin »

Not possible in this dialog since it uses a standard Windows edit box which does not support this. And it would be major project to write a custom edit box.

However, did you know that XY supports Column Mode Editing right in the file list? Tick this:

Configuration | Sort and Rename | Rename | Serial rename by Up and Down keys

JLoftus
Posts: 577
Joined: 22 Jan 2014 14:58

Re: Column Mode Editing in "Edit Item Names" dialog

Post by JLoftus »

I did not! Thanks Don!

JLoftus
Posts: 577
Joined: 22 Jan 2014 14:58

Re: Column Mode Editing in "Edit Item Names" dialog

Post by JLoftus »

OK I've just had a chance to look at that option setting, and I did have it checked, now I realize this is something I do use frequently, but it's not the same as my example above. In your "up/down keys for serial rename" I can perform rename operations sequentially without having to choose F2 or click twice to select into editing mode... indeed, that is very handy, I do use that often. However, it still does not allow selecting multiple files and cutting a portion from their filenames at once. If I could use column mode editing in the "Edit Item Names" dialog, I could accomplish that, but I do understand about using the standard edit box. In MFC you could superclass the control and reuse it as needed. VB6 doesn't support inheritance (VB 2008 does).

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Column Mode Editing in "Edit Item Names" dialog

Post by admin »

Too much for a file manager IMO.

So you should take your filenames from "Edit Item Names" into your Column Mode Editor, do your editing, then take them back to "Edit Item Names" and OK.

klownboy
Posts: 4109
Joined: 28 Feb 2012 19:27

Re: Column Mode Editing in "Edit Item Names" dialog

Post by klownboy »

admin wrote:Configuration | Sort and Rename | Rename | Serial rename by Up and Down keys
Thanks for that tip. I've been using XYplorer quite awhile and I'm still finding out new features. I've always wanted to be able to do this. :tup:
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: Column Mode Editing in "Edit Item Names" dialog

Post by highend »

Extract the archive, put "ColumnEdit.ahk" in a path that is not UAC protected, compile it (with AHK).
Alternatively put the "ColumnEdit.exe" in that folder and forget about the .ahk file
Run it once
It will create an .ini file in the same directory "ColumnEdit.ini"
Open it and edit the path to your editor that supports column editing

Add a script in XY to a shortcut key and adapt the run command to the path of your .exe file:

Code: Select all

    writefile("%TEMP%\~ColumnEdit.txt", <get SelectedItemsNames <crlf>>, , "utf8bom");
    run "D:\Tools\AutoHotkey\@Scripts\ColumnEdit\ColumnEdit.exe", "%TEMP%";
    #147;
Whenever you invoke the keyboard shortcut, your editor will open with that temp file.
Edit it as you like. On each save the edit window in XY will update with the new text.
Whenever you close that window in XY, "ColumnEdit.exe" will quit half a second later
Attachments
ColumnEdit_v1.zip
(395.29 KiB) Downloaded 148 times
One of my scripts helped you out? Please donate via Paypal

JLoftus
Posts: 577
Joined: 22 Jan 2014 14:58

Re: Column Mode Editing in "Edit Item Names" dialog

Post by JLoftus »

admin wrote:So you should take your filenames from "Edit Item Names" into your Column Mode Editor, do your editing, then take them back to "Edit Item Names" and OK.
Yes, thanks, this is what I've been doing when the edits are more than a handful of files.

@highend, thanks for this, I'll give it a look.

JLoftus
Posts: 577
Joined: 22 Jan 2014 14:58

Re: Column Mode Editing in "Edit Item Names" dialog

Post by JLoftus »

@highend, I am not sure what I am doing wrong.

When I run the snippet, the user-button shows the three lines of code as a menu popup, rather than executing them.

When I click the first line, the ~ColumnEdit.txt file is correctly created in the %temp% folder. If I then click user button again and choose the second line, the ~ColumnEdit.txt file is opened in my editor, which I can then column edit and save. but then when I click the third line (#147) it opens the "Edit Item Names" dialog with the original files. Am I supposed to "select all". copy, then paste into this (as Don's tip above)? If so, that's fine, this just automates the process of copying the filenames from the dialog and pasting into the text editor, which is great, but I don't know why the code is not executing rather than showing me the three lines. Something with the syntax, semicolons, etc?

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: Column Mode Editing in "Edit Item Names" dialog

Post by highend »

You did not copy and paste the whole code. Every line after the first must be indented (or all of them). So all your three lines begin in the first column, not in the 5th (because all lines begin with 4 spaces in what I posted).

My .ahk application does the following:
It reads the last modified timestamp from the temp file. Whenever you save the code in your editor, the timestamp changes and the .ahk (or .exe) file knows that the content must have changed (at least it should). So it reads the content of this file and replaces the current content in XY's edit item names window with it. Even if you decide that you need to make a change again (in the editior) while you haven't closed XY's edit item names window in the meantime, the text get's updated in there.

The short form: It makes editing easier because you don't need to copy and paste content between XY's window and your editor's window (and switching between their windows) all the time...
One of my scripts helped you out? Please donate via Paypal

JLoftus
Posts: 577
Joined: 22 Jan 2014 14:58

Re: Column Mode Editing in "Edit Item Names" dialog

Post by JLoftus »

Nice! Working perfectly now! My bad, I was unaware that subsequent lines had to be indented and I indeed had all three lines in col 1.

Thank you, this works great!

JLoftus
Posts: 577
Joined: 22 Jan 2014 14:58

Re: Column Mode Editing in "Edit Item Names" dialog

Post by JLoftus »

@highend I got myself another cup of coffee, here's one for you too 34W32457PT5604104

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: Column Mode Editing in "Edit Item Names" dialog

Post by highend »

*drinking it right now* thanks :)
One of my scripts helped you out? Please donate via Paypal

JLoftus
Posts: 577
Joined: 22 Jan 2014 14:58

Re: Column Mode Editing in "Edit Item Names" dialog

Post by JLoftus »

It seems I am no longer able to use this. I've been using this script for almost two years without issue, but now, after making changes in the external editor, the changes are still correctly returned to the "Edit Item Names" dialog, however, now when you click OK, the "Rename Special" dialog now shows the New name as <unchanged>.

If I click "Edit Pattern" and manually make changes, and click OK to return to the "Rename Special" then the New name shows the previewed change.

I've even tried recompiling the AHK provided by @highend, but same result. The changes appear in the preview prior to clicking OK, but the Rename Special dialog no longer sees the changes, rather instead reports "<Unchanged>". Can anyone else please test this?

I'm using XY version 19.10.0228

Thanks

Jeff

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: Column Mode Editing in "Edit Item Names" dialog

Post by highend »

This is not a problem of my script. The error was introduced with v0227, probably as a result of the MUSD
changes

Code: Select all

    + MUSD Menus: Re-arranged the context menu commands for files to a more 
      natural sequence:
      - Open        (Click)        [Default]
      - Go          (Ctrl+Click)
      - Go and Open
      Note that Ctrl+Click is used for "Go" in consistence with the Address Bar 
      (when "Configuration | General | Controls and More | Miscellaneous | Open 
      files from Address Bar" is ON, then Ctrl+Enter is the way to force Go over 
      Open). There is a small price for this: Bypassing CFA by holding CTRL is 
      not possible anymore.
One of my scripts helped you out? Please donate via Paypal

Post Reply