Set a window Always On Top

This AutoHotkey script is related to this post:

https://community.sdl.com/product-groups/translationproductivity/f/studio/35337/why-is-the-find-and-replace-window-is-not-always-on-top

where the poster asked to set the Find and Replace window on top of the Editor.

The following script will set any window Always On Top. It works with any window, not only the Find and Replace dialog box.

I use the Application key plus the V keys as a hotkey, but you can change it to your convenience.

☛ The Application Key is also called the Menu Key and when pressed it opens a contextual menu: Screenshot of an AutoHotkey script to set the Find and Replace window in Trados Studio always on top using the Application key and V.

AppsKey & v::
        while GetKeyState("AppsKey", "P")
                Sleep, 20
        Winset, Alwaysontop, Toggle, A
return

Add these lines to your script file and when the Find and Replace window (or any window) is open and active, press the hotkey. From now on the window will be on top on any window, not that just the Editor. And it'll be on top until you close the Find and Replace dialog box or until you press again the same hotkey.

  • If you close the Find and Replace dialog box, and re-open it later, you will need to press your hotkey again to set it always on top.
  • If you use another hotkey, you might need to edit the GetKeyState parameter accordingly.

I hope it helps!



Generated Image Alt-Text
[edited by: Trados AI at 4:31 AM (GMT 0) on 5 Mar 2024]
emoji
Parents Reply
  • Hi

    I am trying to set and run only one script at the time.

    Could you please confirm the below steps of mine or give your step by step manual as how to set it up

    1. Home tab => Ahk => AutoHotKey scripts

    Trados Studio AutoHotKey Manager window showing no scripts listed and a path to the master script file.

    2. Copy-pasting your script text to the Scrip Content field and saving it

    AutoHotKey Manager script editing window with 'always on top' script for Find and Replace window, including script content.

    3. Closing the AutoHotKey manager window and starting a file for translation in Editor

    4. While translating, pressing Ctrl+А (to Ctrl+H) to get Find and Replace window opened (at this moment the window goes behind if clicking somewhere else in the editor)

    5. Pressing Context Menu key?

    Here is the outcome

    Find and Replace window in Trados Studio with a context menu open, showing options in a non-English language.

    Kindly clarify what I need to fix in my steps

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 4:31 AM (GMT 0) on 5 Mar 2024]
Children