1 day ago · Tech · hide · 0 comments

I play an idle tower-defense game called The Tower. A run at my tier takes 19 to 30 minutes and pays out about 30 million coins. Then a GAME STATS dialog pops up and waits for me to click RETRY. If I’m asleep, the game sits on that dialog and earns nothing. Ten hours of that is somewhere between 20 and 30 runs, or 600 to 900 million coins, left on the table. So I wrote a bot to click the button. One Python file, about 150 lines, one small PNG. The Bet Auto-upgrade and auto-perks are already turned on in the game, and I have ads off, so a run needs no decisions from me. The only human step is the click. If a script can see the dialog and click RETRY, the game plays itself overnight. Problem One: Find the Window Wherever It Is macOS lists every window through Quartz, with its title and its bounds on screen. The script reads the bounds on every loop and works out every click as a fraction of the window. def find_window(title): for w in Quartz.CGWindowListCopyWindowInfo(…

No comments yet. Log in to reply on the Fediverse. Comments will appear here.