AHK to automate series of operations

Is it possible to write an AHK sequence to do the following tasks:

File -> Options

Options -> Auto-propagation

Auto-propagation: set or clear “Enable Auto-propagation” checkbox

 

Background: I frequently need to enable/disable auto-propagation

 

Unless, of course, there is a shortcut that performs this task

Parents
  • Hi Anthony,

    I was able to quickly put this together (on Studio 2017), you might need to tweak sleep times or replace keys sent if your Studio instance is not in English but another language:


    DetectHiddenText, On
    #SingleInstance
    #IfWinActive, ahk_exe SDLTradosStudio.exe

    ^!a::
    Send, {AltDown}ft{AltUp}
    WinWait, Options
    Send, editor
    Sleep, 500
    Send, auto-pro
    Sleep, 1000
    WinGetText, OptionsText, Options
    IfNotInString, OptionsText, &Enable Auto-propagation
    {
        Sleep, 1000
        WinGetText, OptionsText, Options
        IfNotInString, OptionsText, &Enable Auto-propagation
        {
            MsgBox, Something went wrong, please adjust setting manually.
            return
        }
    }
    Send, !e
    Sleep, 500
    Send, {Return}
    WinWaitClose, Options
    Return


    Hope this helps!

Reply
  • Hi Anthony,

    I was able to quickly put this together (on Studio 2017), you might need to tweak sleep times or replace keys sent if your Studio instance is not in English but another language:


    DetectHiddenText, On
    #SingleInstance
    #IfWinActive, ahk_exe SDLTradosStudio.exe

    ^!a::
    Send, {AltDown}ft{AltUp}
    WinWait, Options
    Send, editor
    Sleep, 500
    Send, auto-pro
    Sleep, 1000
    WinGetText, OptionsText, Options
    IfNotInString, OptionsText, &Enable Auto-propagation
    {
        Sleep, 1000
        WinGetText, OptionsText, Options
        IfNotInString, OptionsText, &Enable Auto-propagation
        {
            MsgBox, Something went wrong, please adjust setting manually.
            return
        }
    }
    Send, !e
    Sleep, 500
    Send, {Return}
    WinWaitClose, Options
    Return


    Hope this helps!

Children