#๐Ÿ”’ Need help with a 'basic' graphics analyser or something

28 messages ยท Page 1 of 1 (latest)

cerulean burrow
#

Hello, I'm really, really new to python and I wanted to make a script that would click on a text on screen as practice, but I don't even know where to start, can anyone help me with it or point me to some tutorials? English is my second language so I dont even know what to google here.

atomic pantherBOT
#

@cerulean burrow

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

median lotus
cerulean burrow
#

Basically, I'm trying to get python to look at my screen, look for and click on a specific text when it detects it.

#

That's pretty much it

median lotus
#

A specific text regardless of where it sees it? Or are you trying to click a link on a website specifically?

cerulean burrow
#

Either or. In this case, the location of the text is set. There are 2 locations, and it randomly switches between these 2 spots

#

As embarrassing as it is to say, I'm pretty slow in the head, so I don't even know how to get python to look at these 2 spots, look for a couple words and click on them myself.

median lotus
#

well, to be fair this is a pretty complicated & difficult task

cerulean burrow
#

Oh

median lotus
#

The general approach would be to take a screen shot of your screen, use some OCR to detect text, then command the mouse to click where the text was found

#

For the first two items, you might want to use a library called OpenCV

#

however

#

if it's just a website you're automating, there are a couple better ways

cerulean burrow
median lotus
#

Can you share what this text is and where it comes from?

cerulean burrow
#

Voscreen. It's a language learning site where it plays a movie clip, offers 2 dialogue options (Subtitle on - subtitles off) then offers 2 more dialogue options, which are translations of the clip's dialogue

#

What I wish to do is first click on subtitles off (It's position is always static.), then look for a desired text and click on it. Then reload the page, this part I was planning on manually doing

median lotus
#

for that part you can use a library called Selenium

#

You can have it open a browser window (using chrome or whatever other browser), but it's able to interact with it programmatically

cerulean burrow
#

Do you have a tutorial on it that you know of?

median lotus
#

no, you'll just have to search it up "python selenium tutorial"

cerulean burrow
#

Gotcha

#

Thanks!

#

This is definitely way better than bruteforcing my way

atomic pantherBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.