HL

Forgot to say, that you need the uber-useful Keyboard Maestro to execute the macros.

1 person likes this

w

will.helton

said
over 1 year ago

Absolutely brilliant! Well done, Mr. L!

You always do come up with the most useful stuff! :)

Will

1 person likes this

w

woorden

said
over 1 year ago

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:

You installed Python

You downloaded the Python script (from where?)

Changed some (ab)user-specific links in the macro

Far better would be if the user was told about checking if Python has been installed (how obvious that may seem to be), and if the Python script would have been included in the macro.

And you don't need KM, as usual with rather simple automation.

H.

w

woorden

said
over 1 year ago

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.

H

HL

said
over 1 year ago

Hans, obviously you didn’t read the instructions at the KeyboardMaestro Discourse very well. The source of the Python script is written there and also a download link for the correct Python version. Please do me a favour and refrain from further posting to this thread, in order to keep it readable. Thanks for your kind understanding! PS Be a Sport and consider to remove your incorrect postings.

w

woorden

said
over 1 year ago

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.

H

HL

said
over 1 year ago

>Thing is, the macro posted here is unusable as is. // The necessary instructions for modification are detailed in the KBM article. > Besides, it's far more elegant to include the Python script in the macro. And why not? // Because it’s good practice to refer to the original source of the script, perhaps it’ll get updated by the author.

w

woorden

said
over 1 year ago

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.

H

HL

said
over 1 year ago

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.

w

woorden

said
over 1 year ago

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.

1 person likes this

H

HL

said
over 1 year ago

Updated version, cursor is now positioned in the Target Segment editor and all content is selected prior to inserting the clipboard content:

alain

said
over 1 year ago

Hi,I'm doing something similar here, but I paste the results in a Sticky positioned just above CT (and apply a few KBM filters to automatically make a few corrections in the clipboard (for example, replacing English straight apostrophes produced by DeepL with French curled apostrophes, and so on), so I don't have to do it myself.

I also noticed that DeepL proposes again and again the same "wrong translation" (or a translation that I don't like, let's say) for some fragments. I tried to make KBM look for those "wrong translations" in a blacklist file and then signal them in the pasted result (in red characters, for example), but I failed (I might ask for some help on the KBM forum).It reminds me of an old request for CT, a few years ago: 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). That would be very useful...

I

Igor Kmitowski

said
over 1 year ago

> 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).