|
|
|
@ -2,7 +2,8 @@ import psutil |
|
|
|
import pyautogui as send_input |
|
|
|
import subprocess |
|
|
|
import os |
|
|
|
CLICKER_START_COM = os.path.expandvars('"%userprofile%\Documents\clickerP.exe" 20') |
|
|
|
CLICKER_PATH = os.path.expandvars(r"%local_repo%\other\toggler\clicker.exe") |
|
|
|
CLICKER_START_COM = [CLICKER_PATH,'20'] |
|
|
|
class clicker_manager: |
|
|
|
def __init__(self): |
|
|
|
self.proc_id = None |
|
|
|
@ -10,7 +11,7 @@ class clicker_manager: |
|
|
|
if process.name() == 'clickerP.exe': |
|
|
|
self.proc_id = process.pid |
|
|
|
break |
|
|
|
print(self.proc_id) |
|
|
|
print(self.proc_id) |
|
|
|
if self.proc_id is None: |
|
|
|
self.proc_id = subprocess.Popen(CLICKER_START_COM).pid |
|
|
|
self.on = False |
|
|
|
@ -35,5 +36,9 @@ class clicker_manager: |
|
|
|
proc.kill() |
|
|
|
except psutil.NoSuchProcess: |
|
|
|
pass |
|
|
|
|
|
|
|
def update(self): |
|
|
|
self.on = os.path.exists(os.path.join(os.path.dirname(CLICKER_PATH),'on')) |
|
|
|
|
|
|
|
if __name__ == "__main__": |
|
|
|
test = clicker_manager() |