Tapatalk

Replace in Files blanks directory and file/types after usage (fixed)

Replace in Files blanks directory and file/types after usage (fixed)

1
NewbieNewbie
1

    Jun 30, 2015#1

    Version: 22.10.0.10

    After hitting the Replace all button in Replace in Files, the "In files/types" and "Directory:" fields go blank. This is highly annoying since I am attempting to perform multiple Replace alls and have to set those two fields between each use. I will also follow up with a Find in Files, but the Replace all has caused the same fields to go blank also. If this is intentional, there is already an "Are you sure?" pop up message so blanking these fields to prevent a subsequent accidental replace all is overkill and a hindrance.

    I have "List changed files" and "Search subdirectories" checked.
    "In files/types" is typically set to "*.c;*.cpp;*.txt"
    "Directory:" is typically set to a short path similar to "C:\project\one"

    6,685587
    Grand MasterGrand Master
    6,685587

      Jun 30, 2015#2

      This unwanted behavior is caused by a confirmed bug under certain conditions detected and reported by me to IDM support one month ago.

      Here is my report to IDM support.
      Mofi wrote:Subject: In Files/Types always empty on opening Replace in Files under certain conditions

      I executed several dozens "Replace in Files" on *.cpp and *.h files with UE v22.0.0.66 on Windows XP SP3 and also on Windows 7 x64 both with Windows Classic desktop theme and went nearly crazy as I had to reselect "In files/types" entry "*.cpp;*.ini" again and again in "Replace in Files" window before I could run each Replace in Files.

      I needed more than an hour to find out under which condition UltraEdit does not remember the "In files/types" setting used on last "Replace in Files".

      Here are the instructions to reproduce this issue.
      • Copy file changes.txt of UE to directory C:\Temp and make a copy of this file with name changes.ini also in C:\Temp. There should be no other *.txt or *.ini file in directory C:\Temp.
      • Start latest UltraEdit with all settings set to default. Open "Advanced - Configuration - Toolbars / Menus - Miscellaneous", click on button "Clear history", click on button "Cancel" and exit UltraEdit with Alt+F4.
      • Restart UltraEdit, open with Ctrl+Shift+P the "Replace in Files" window, enter as search string the word "document" without the double quotes and as replace string also "document". Enter "*.txt" in field "In files/types" and enter "C:\Temp\" in edit field for "Directory". Make sure that no advanced option is checked.
      • Click on button "Replace All" and 27 changes are made in 1 file.
      • Press Ctrl+Shift+P to open "Replace in Files" window again, edit "In files/types" to "*.ini" and execute again "Replace All". There are again 27 changes made in 1 file.
      • Press again Ctrl+Shift+P to open "Replace in Files" dialog once more and this time click on down arrow of "In files/types" and select entry "*.txt" from the list.
      • Very important - click now directly on button "Replace All". It is important that the selected list entry is still selected in "In files/types" edit field and caret is blinking there.
      • Press Ctrl+Shift+P and you should see "In files/types" now empty.
      So whenever "In files/types" is selected from list and then directly "Replace All" is clicked or executed with Alt+A, UltraEdit does not remember what is set currently in "In files/types" resulting in an empty field on next opening of "Replace in Files".
      The workaround for this bug is to set focus for example to Find what edit field after having selected In files/types from list and browsing to the directory before clicking on button Replace All.

      I must add that I did not see a problem with remembering the Directory, perhaps because I entered it directly instead of browsing to the directory. It might be also good to enter directly In files/types once more instead of selecting *.c;*.cpp;*.txt from the list, set input focus to Find what edit field and then click on button Replace All.

      It would be also good to report this issue to IDM support by email with the note that Mofi encountered the same issue already a month ago. The more users report an issue by email to IDM support the higher becomes the priority for fixing it.

      BTW: The directory path must end with a backslash.

      Update: This bug was fixed in UltraEdit v22.20.0.36 and UEStudio v15.30.
      Best regards from an UC/UE/UES for Windows user from Austria

      1
      NewbieNewbie
      1

        Feb 13, 2018#3

        I got the same issue, the workaround does not work for me and unfortunately I am stuck to Windows XP and I am not able to upgrade to newer versions. I fixed it using this AHK (AutoHotKey) script which works like a charm (the assigned key mapping for 'Find in files' is Alt+R).

        Code: Select all

        $!r::
        Send, !r
        IfWinActive, - UltraEdit ahk_class Afx:00400000:8:00010011:00000000:00560405
        {
        
          ; Wait until Find and Replace window be active
          WinWaitActive, ahk_class Afx:MiniFrame:400000:8:10011:10,,5
            if not ErrorLevel
            {
        
            previous_clipboard:=clipboard
            clipboard:=
        
            ; Select focus and copy contents from 'In files/types'
            MouseClick, Left, 108, 333, 2
            Sleep 5
            Send, ^c
            Sleep 5
        
            ; Press Down if it was empty
            if !StrLen(clipboard)
              Send, {Down}
            Sleep 5
        
            ; Clear selection from 'In files/types'
            MouseClick, Left, 320, 333
        
            ; Set focus on Find what
              MouseMove, 320, 90
              clipboard:=previous_clipboard
        
          }
        
        }
        return