'Creating a Simple Logic Function to Solve Questions

So I play trivia games a lot with my family, and I always lose!! I always know the answers, but I can never seem to type in the answers fast enough, so I came up with the idea to make a computer program to play for me! I'm super new to coding, so I'm not sure how to begin. But my best guess would be to screenshot the computer screen, isolate the question from the rest of the data, run that question through a database of questions/answers I've been building, getting the answer, finding the answer on the screen and clicking it(if its a multiple choice question), or typing the question into an input field. My main issue is I have no idea how to do any of that, or if it's even possible. Any suggestions on where I can look to learn how to do this?



Solution 1:[1]

Well I'm not too sure on how this can be done but here is an idea. Try using python3 with selenium (many tutorials on google) to try and get the question text.

If you want you can also use SQL as database query language. If the questions are already in your database and you have the answer in the same row as the question in the database, you can make a query selection to get the answer and the python3 with selenium program can input the answer text into an input field.

Alternatively you could use BeautifulSoup4 in python3 and then copy+paste the answer into the input field yourself.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 NoeOnJupiter