Can I change input in external app using python?

Question:

I want python code to input particular sentence to a separated open source app. Here’s more information: I have Anki installed on my PC (open-source flashcard program) and I want to write a code that would look up a definition of a word with corresponding examples (e.g sentences that would show a word in context) and then input that into an app so I wouldn’t have to do it manually. So, the question is: ‘Is it possible to access input field in an app using python? And if yes then how?’

btw, I haven’t found anything yet that would somehow answer this question

Asked By: egor_542

||

Answers:

Yes, there are two (easy) ways to do so. Either you write an add-on for Anki, the documentation on how to do so can be found here, or you write a standalone application and interface with Anki through the AnkiConnect add-on, which is documented here. The main difference is that when writing a standalone app, you’ll access directly the collection, so it’s better if you don’t need human intervention at all (or if your application provides its own interface), whereas with an add-on you can easily add buttons and alike to Anki’s interface, so it can be useful if you want the user to be able to trigger the automated parts you have coded. If you need more information or support, I’d recommend you to go to Anki’s official forums rather than asking on StackOverflow, as there Anki’s community isn’t very active here.

Answered By: BlackBeans
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.