Forgot to say, that you need the uber-useful Keyboard Maestro to execute the macros.
Absolutely brilliant! Well done, Mr. L!
You always do come up with the most useful stuff! :)
Will
Will: Absolutely brilliant!
Did you try?
I don't have KM, but I did have a look at the script. As far as I know, using the uber-useful KM won't be successful unless:
Addenda: The Python version should be Python3. I don't think it'll run under older versions. And I know where to download the Python script, but I do think it should have been made clear.
H.
Thing is, the macro posted here is unusable as is. In other words, it'll have to be adjusted and amended. Besides, it's far more elegant to include the Python script in the macro. And why not?
H.
Lenting: Because it’s good practice to refer to the original source of the script, perhaps it’ll get updated by the author
The reference is in the KM entry, not in the script. An update? Apart from how to find out about it, I do hope there's an API by that time.
H.
Hans, Tom has written a comment in the Keyboard Maestro Discourse about how to use the Python script in your beloved solutions, like Automator and AppleScript. Thought that this might interest you ... Have a good Sunday over there in sunny Java.
Lenting: ...your beloved solutions
Beloved solutions? AppleScript and Automator simply come with macOS, just like Terminal, and err, Stickies... No reason not to use them, unless in cases only third party software can solve them or can solve them easier. I'm perfectly sure KM is excellent (no wonder the KM forum is in my RSS fee, and has been there for years), but so far, all the KM macros I've seen for CT, could have been solved by using Automator, AppleScript, and Terminal, and in most cases much easier.
H.
Updated version, cursor is now positioned in the Target Segment editor and all content is selected prior to inserting the clipboard content:
> some kind of Blacklist support, so that CT compares the target content with the blacklist file's words (or expressions) and signals them somehow, somewhere (in the Segments grid, for example).
Prepare your blacklist in a text file and open it via QA > Word list > Check target segment for words... .
HL
Now it's possible to get DeepL's translation directly in CafeTran's target editor, without any screen flickering etc.
Note that the used API is temporarily!
See: https://forum.keyboardmaestro.com/t/translate-via-deepl/7910/2
Thank you very much, Tom!!!
And watch: https://youtu.be/S_AV4K0O2k0