-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathsetup.py
More file actions
67 lines (60 loc) · 2.14 KB
/
Copy pathsetup.py
File metadata and controls
67 lines (60 loc) · 2.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import pyautogui as pag
import time
import pyperclip
import subprocess
# Define the coordinates and use the `actions` list
actions = [
(610, 531, 4), # next
(286, 459, 4), # Accept terms
(610, 531, 4), # next
(610, 531, 4), # next
(610, 531, 4), # next
(610, 531, 4), # install
(387, 253, 10), # type pass
(387, 298, 4), # type pass
(564, 598, 4), # ok
(610, 531, 4), # finish
(849, 746, 10), # open litemanager
(522, 388, 4), # click connect
(460, 321, 4), # right click (select all)
(506, 387, 4), # click copy
(397, 437, 4), # open options
(394, 286, 4), # click auto connect
(510, 312, 4), # change timeout interval
(521, 502, 4), # click okey
]
# Wait for a few seconds to give time to focus on the target application
time.sleep(10)
password = "ArifKembir1"
timeout = "10"
for x, y, duration in actions:
if (x, y, duration) == (387, 253, 10):
pag.click(x, y, duration=duration)
pag.typewrite(password)
elif (x, y, duration) == (387, 298, 4):
pag.click(x, y, duration=duration)
pag.typewrite(password)
elif (x, y, duration) == (460, 321, 4):
pag.rightClick(x, y, duration=duration)
elif (x, y, duration) == (610, 531, 4):
pag.click(x, y, duration=duration)
cmd = r'"C:\Program Files (x86)\LiteManager Pro - Server\ROMServer.exe" /start'
subprocess.run(cmd, shell=True)
elif (x, y, duration) == (510, 312, 4):
pag.click(x, y, duration=duration)
pag.press('backspace') # Press backspace once
pag.press('backspace') # Press backspace again
pag.typewrite(timeout)
else:
pag.click(x, y, duration=duration)
def save_echo_to_batch(file_path, echo_text):
with open(file_path, 'a') as file:
file.write(f'\necho {echo_text}')
def save_command():
clipboard_text = pyperclip.paste()
password_echo = 'LiteManager Password : ArifKembir1'
save_echo_to_batch('show.bat', f'LiteManager ID: {clipboard_text}')
save_echo_to_batch('show.bat', password_echo)
if __name__ == "__main__":
save_command()
print("Done , Log in Credintials is below")