Python Forum

Full Version: How to make a simple automation process of login using "if condition"
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all,

I am new here, and I am beginner level on coding, so if I appear ignorant, please bear with me.

So here is the scenario, I play a game called World of Warcraft, and the game some time would disconnect me if I am inactive. Because the server I am on have huge population, if I am kicked out, I have to wait for like hours in queue to play again. However, if I am discounted, but I log back in within 5min, I don't have to wait in the queue.

Thus I have the thought of using Python to automate this process. Basically, here is how I want to design the code:

1. Python monitor the game in the background
2. If game doesn't disconnect, then do nothing
3. If game disconnect me, the game will go to the login page, Python detects this page, and click on "start" so I log back in

Note that, I don't need to enter user name or password, I just need to click on "Play" button on another interface, it would automatically log me in.

The logic is pretty simple, however I don't know how I ask python detect different interfaces. But I am pretty sure there is an unique ID for different interfaces and windows. Anyone know how should I do this? Or for each functionality if you can kindly tell me what they are and where to find, I can try to piece them together myself the code.

Thank you!
Here is an article on making a Python bot that plays a sushi game - https://code.tutsplus.com/tutorials/how-...tive-11117 - I'm sure that you can use the same concept from this article to achieve your goal. If you run into any problems while trying to improvise the method into your purpose come back and ask on this question.
Hi, are you able to proceed further without loops?

Regards,
H. Smith
(Jan-06-2020, 07:17 PM)hinay Wrote: [ -> ]are you able to proceed further without loops?
Sorry, I don't quite get what your asking here.