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
  • Hi Eva,

    I'm learning as you are, so had a go despite there being an app for this.  I thought I could use the alt keys in the script for this.  So, Alt+h+u+t gets me the translated status for example.  But I can't get the use of multiple keys to work correctly and always end up with the Alt keys activated in the ribbon and the letters ut in my segment.  In fact I've tested this so many times now I can remember the different Alt key shortcuts for them all and this works really well ;-)

    Regards

    Paul

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

  • LOL, that is totally crazy. I never knew this, although I'm a mouse-hater and a keyboard-afficionado. I guess I never bothered with it because I always got where I wanted with regular shortcuts. But I don't really understand the point behind it. Why allow/support this but not regular keyboard shortcuts? I strikes me as a lot more complicated!
  • Indeed it is. I don't know why we don't have keyboard shortcuts for this, although I've now got the habit forming of using:

    Alt+h+u+t
    Alt+h+u+d etc...

    We tried to do this with the app to resolve this but even using the API were unable to have this work on multiple segments, so here your AHK shortcut is working better, although it's probably different for other users depending on the size of their screen and whether they run with Studio minimised or maximised. I wanted to avoid that by using the Alt keys in the script which is why I messed around with these shortcuts.

    Regards

    Paul

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

  • Personally, I don't really need this to work on multiple segments, I need it segment-by-segment during the translation process, that's why at the moment the AHK script is my preferred option because it also allows jumping to the next segment like Ctrl+Enter does while translating.
  • Unknown said:
    Personally, I don't really need this to work on multiple segments, I need it segment-by-segment during the translation process, that's why at the moment the AHK script is my preferred option because it also allows jumping to the next segment like Ctrl+Enter does while translating.
     

    I think the fact that you can add actions to the script and that it can be applied to multiple segments makes the script very valuable. I would agree with Paul and Raphaël that using the ribbon shortcuts would make the script more reliable and transferrable than using screen coordinates, as application size and even monitor placement could affect the operation of the script. For example, I keep my scripts in a Dropbox folder and then use them both on my main computer which has large monitors and on my portable computer, which has a small screen.

    Just out of curiosity, can I ask why you do this during the translation process? Do you change the status of every segment as you work or only some segments? I'm just curious about the possible scenarios.

    And then, finally, so glad to hear you're enthusiastic about AHK, I think the more people join the forum and contribute to it, the easier it will be for all of use to keep learning for our specific use cases.

  • I normally translate English > German. However, for a very special client I have recently started working German > English, because I specialize in the subject matter. The subject is quality management, and because QM heavily relies on ISO standards, it is full of terminology and quotes (which, however, are not obvious to somebody who is not familiar with the subject).
    Even seemingly simple stuff like "section" or "implement" is terminology in the strictest sense of the word.

    Since as a non-native speaker of English, my grammar leaves a lot to be desired, I need a native speaker to proofread my work. That native speaker is welcome to edit the hell out of everything I have actually translated, but a lot of what turns up in my "translations" are in fact more or less direct quotes from the QM standards, which must not be touched (although they very often have linguistic shortcomings that my editors would like to eliminate).

    Therefore, I use different statuses to indicate to the proofreaders the degree to which changes are allowed.

    "Translation Rejected" means "I did it, feel free to improve the text as much as you can."
    "Translated" means "edit with care, because there is some terminology and jargon there, but also some questionable grammar on my part."
    "Translation Approved" means "keep off, it's a full quote, even if you don't like it."
Reply
  • I normally translate English > German. However, for a very special client I have recently started working German > English, because I specialize in the subject matter. The subject is quality management, and because QM heavily relies on ISO standards, it is full of terminology and quotes (which, however, are not obvious to somebody who is not familiar with the subject).
    Even seemingly simple stuff like "section" or "implement" is terminology in the strictest sense of the word.

    Since as a non-native speaker of English, my grammar leaves a lot to be desired, I need a native speaker to proofread my work. That native speaker is welcome to edit the hell out of everything I have actually translated, but a lot of what turns up in my "translations" are in fact more or less direct quotes from the QM standards, which must not be touched (although they very often have linguistic shortcomings that my editors would like to eliminate).

    Therefore, I use different statuses to indicate to the proofreaders the degree to which changes are allowed.

    "Translation Rejected" means "I did it, feel free to improve the text as much as you can."
    "Translated" means "edit with care, because there is some terminology and jargon there, but also some questionable grammar on my part."
    "Translation Approved" means "keep off, it's a full quote, even if you don't like it."
Children