Script for changing segment status

Inspired by Paul's recent blog post, I've just tried for over an hour to create a script to change the segment status. Specifically, I want to be able to assign the status "Translation Approved" and "Translation Rejected" via keyboard shortcuts while I'm in "Translation" mode in the Editor.

I consulted the AHK documentation and watched a couple of tutorials and found that what I'm trying to do should be easy enough - just two mouse clicks, first on "Change Segment Status", then on the respective status. Figuring out the absolute cursor positions on my screen was also easy using "Active Window Info".

So the script below is supposed to assign "Translation Approved" in the maximized Editor window on a 27'' screen when I press Ctrl + Win key + q. But unfortunately, it doesn't. It clicks on "Change Segment Status", but then it stops without clicking on the status. Can anybody see or guess what I've done wrong here?

Thanks in advance!

Eva

;Studio 2017: Change Segment Status > Translation Approved (find absolute mouse cursor position using "Active Window Info" in AHK's program folder)
^#q::click 1346 108
click 1346 218
ExitApp

Parents
  • Thanks for answering to this. Although your reply is nowhere to be found on this forum, I got an e-mail notification for it. Paul had suggested that one, too, and I'm now lucky enough to have three different ways to achieve something I coudn't do at all a couply of hours earlier :-)

    I honestly don't know which one of the options is going to stick, but I'm looking forward to finding out.

    I'm also starting to get really enthusiastic about AHK, so I hope you won't live to regret your generous offer of helping with scripts when Paul announced this forum :-)
Reply
  • Thanks for answering to this. Although your reply is nowhere to be found on this forum, I got an e-mail notification for it. Paul had suggested that one, too, and I'm now lucky enough to have three different ways to achieve something I coudn't do at all a couply of hours earlier :-)

    I honestly don't know which one of the options is going to stick, but I'm looking forward to finding out.

    I'm also starting to get really enthusiastic about AHK, so I hope you won't live to regret your generous offer of helping with scripts when Paul announced this forum :-)
Children