mirror of
https://github.com/rawrafied/LastWarBot.git
synced 2026-04-16 08:52:20 +00:00
- a recreation of the auto-clicker app VP functionality with the Windows App version of Last War. - Additional functionalities: ---- Retarts the app every 5 mins. ---- Has functionality to check for pop-ups when app reloads (currently only handles lot domino) - Additional Files: ---- Has bare-bone scripts for alternative bot methods: via bluestacks/adb or using library pywin instead of win32. ---- Has initial import of image-processing library pytesseract. ---- Has image reference folder of some images to be used to optimize the bot. - Limitations: ---- Has to use mouse cursor (doesn't work in background) ---- Initial game file to launch is hard coded for dev location ---- Click locations associated with dev environment dimmensions, not dynamically derived.
39 lines
1.1 KiB
Python
39 lines
1.1 KiB
Python
# -*- coding: utf-8 -*-
|
|
"""
|
|
INITIAL CREATION: Rawrafied 1/3/25
|
|
DESCRIPTION:
|
|
- Class to manage interfacing with application
|
|
"""
|
|
# LIBRARY IMPORTS: ################################
|
|
import pywinauto
|
|
import pyautogui
|
|
|
|
|
|
import subprocess
|
|
import time
|
|
|
|
# ADBSERVER_MANAGER CLASS FUNCTIONS: ##########################
|
|
class appwindow_manager_pywin():
|
|
# MAIN FUNCTION:
|
|
def __init__(self, verbose):
|
|
# INITIALIZE CLASS VARIABLES
|
|
self.verbose = verbose
|
|
self.appexedir = str('C:\\Users\\talks\\AppData\\Local\\TheLastWar\\Launch.exe')
|
|
self.appopen = 0
|
|
|
|
# INITIAL FUNCTION CALLS
|
|
print("INITIALIZING APPWINDOW_MANAGER")
|
|
self.open_window()
|
|
self.gotovpscreen()
|
|
|
|
# INITIALIZE CONNECTION BETWEEN SCRIPT AND APP
|
|
def open_window(self):
|
|
self.AppWindow = pywinauto.application().connection(title="Last War-Survival")
|
|
print (self.AppWindow)
|
|
|
|
|
|
# FUNCTION TO OPEN SECRETARY POSITION SCREEN:
|
|
def gotovpscreen(self):
|
|
print("GOING TO VP DISPLAY")
|
|
|
|
|