Script for batch tasks

I've been trying to create a script to run batch tasks by emulating the keyboard shortcuts, but I'm getting nowhere. Can anyone point me in the right direction (whichever direction that is)? E.g. I'd like to run Analyse Files, auto-select 'Finish', then 'Close', then 'Yes' (to reopen the file) and then go to first untranslated segment. Maybe trying to reinvent a wheel here?

Thanks,

Olly

Parents Reply
  • Hi again Jesus,
    I hope you can help me again. I have tried a few things, and thought I had the monkey by the tail, but I can't get the 'Close' stage to process in the Batch processing 'Finish' window. When I manually click on Close or hit enter the script continues to run. My adaptation of your script looks like this, and everything else works fine:

    #IfWinActive ahk_exe SDLTradosStudio.exe
    ^F5::
    Sleep 600
    Send !h
    Sleep 600
    Send !b
    Sleep 600
    Send {down}
    Sleep 500
    Send {Enter}
    WinWaitActive, Batch Processing
    Send {Enter}
    Sleep 500
    Send {Enter}
    WinWaitActive, Batch Processing ; waiting for the analysis to finish. As this is also a batch processing window, I thought I could use it here too. Or maybe you didn't use it for a reason...
    Send {Enter} ; ... but now I have to do this manually by pressing Enter
    WinWaitActive, Question ; the script now continues successfully
    Send {Enter} ; YES button
    Sleep 5000
    Send ^{Enter}
    Return
    #IfWinActive

    Thanks,

    Olly
Children