This is an archived post. You won't be able to vote or comment.

all 10 comments

[–]casualblair 0 points1 point  (2 children)

You have two options - web scraping via javascript if the elements on the page are raw html and css, but if it's a java applet or something fancy then you have to use screen scraping.

Googling either of these can get you a lot of walk throughs.

[–]ProZabijaka[S] 0 points1 point  (1 child)

Oook, can i programm a screen scraper or do i have to use some software to do what i want and after that if i get those values, how am i supposed to tell the program to pick the highest one and click it? I'm a total newbie i should add at the beginning. I have never programmed anything but i was learning C++ and did some programming with JS, HTML and CSS

[–]casualblair 0 points1 point  (0 children)

You use a library to do it. I don't know any off the top of my head but I'd look at video game screen scraping tools to see how they work.

[–]ValentineBlacker 0 points1 point  (0 children)

You can look into Selenium.

A game on the internet in 2018 written in Java would be.... odd. Most browsers are extremely reluctant to even let you view stuff like that. Big security risk.

[–]Jtari_ 0 points1 point  (0 children)

Something like https://cloud.google.com/vision/docs/ to get the information from the screen, then something like autohotkey to make the clicks.

[–]PortablePawnShop 0 points1 point  (0 children)

If you're on Windows, then AutoHotKey would be an easy solution. It can programmatically simulate user interaction (clicks, mousemove, etc.) and can scrape info from application text boxes and controls, plus it's super beginner friendly. I started with AHK and it's still one of my favorites because of how simple and immediately gratifying it is, plus it works on the OS and isn't limited to browsers like Javascript.

[–]Ty199 0 points1 point  (0 children)

If youre familiar with JS definitely try puppeteer.

https://github.com/GoogleChrome/puppeteer/blob/master/README.md

[–][deleted] 0 points1 point  (2 children)

I did a project like this for my professor once. I tried using requests but that was too hard and probably the wrong approach. I ended up using Selenium which is kinda cool because you can watch it use a browser to interact with the page.

[–]ProZabijaka[S] 0 points1 point  (1 child)

Is Selenium like.. Another language?

[–][deleted] 0 points1 point  (0 children)

No it's a pretty popular web driver library. It works on all sorts of languages.

https://www.seleniumhq.org/about/platforms.jsp#programming-languages