Find&Replace window on top again

Hello, possibly to @PaulFilkin, who helped me on this issue a few months ago,
I'm in trouble again with the F&R window that remains stuck on top of any page in my PC. Could be after the last Trados update?

I tried to repeat the AutoHotkey actions that were recommended to me, but to no avail. In addition to that, my antivirus is telling me that the script has a virus.

Can someone help?

Thanks in advance

emoji
Parents Reply
  •  
    Hi Paul, I am really sorry to bother you again, but I am just realizing that, while the F&R window does no longer stay on top when I exit Trados, it's having the other problem I had months ago, namely that the Ctrl+H control does not open the Replace window directly, but only the Find window first and then I have to click again on the Replace tab to get that other option.
    I am afraid that I copied an older version of the script, as I remember you gave me 2 or 3 options along our discussions months ago. 
    So my question is: do you happen to have the full version (that resolves both problems) at hand?
    The one I have entered now is below. Can you check if it's the correct one?

    ;------------------------------------------------------------------------------
    ; Ensure "Find and Replace" window is always on top when Trados Studio is active
    ; and not always on top when Trados Studio is not active
    ;------------------------------------------------------------------------------

    #Requires AutoHotkey v2.0

    #HotIf WinActive("ahk_exe SDLTradosStudio.exe")

    $^f:: triggerFindAndReplace()
    $^h:: triggerFindAndReplace()

    triggerFindAndReplace() {
        find := "Find and Replace" ; Window title of the Find and Replace window
        Send '^f'
        If WinWaitActive(find, "", 2) {
            WinSetAlwaysOnTop(1, find) ; Use 1 for On
    ;        SoundBeep(1500)
        }
    }

    ; Check the active window every 100 milliseconds
    SetTimer CheckActiveWindow, 100

    CheckActiveWindow() {
        find := "Find and Replace"
        activeWin := WinExist("A")

        if activeWin and WinActive("ahk_exe SDLTradosStudio.exe") {
            if WinExist(find) {
                WinSetAlwaysOnTop(1, find) ; Turn on always on top if Trados Studio is active
            }
        } else {
            if WinExist(find) {
                WinSetAlwaysOnTop(0, find) ; Turn off always on top if Trados Studio is not active
            }
        }
    }

    #HotIf

Children
No Data