-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
46 lines (46 loc) · 1.23 KB
/
Copy pathmain.py
File metadata and controls
46 lines (46 loc) · 1.23 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
import pyautogui
import pyperclip
import time
import customeReply
import genai
def copy_text():
click_x, click_y = 1140, 1055
start_x, start_y = 690, 200
end_x, end_y = 1730, 940
pyautogui.moveTo(click_x, click_y)
pyautogui.click()
time.sleep(0.5)
pyautogui.moveTo(start_x, start_y)
pyautogui.mouseDown()
pyautogui.moveTo(end_x, end_y)
pyautogui.mouseUp()
time.sleep(0.5)
pyautogui.hotkey('ctrl', 'c')
time.sleep(0.5)
copied_text = pyperclip.paste()
return copied_text
extracted_text = copy_text()
text = extracted_text.split(':')[-1].strip()
print(text)
while True:
if text in customeReply.replies:
response_list = customeReply.replies[text]
pyautogui.moveTo(810, 980)
pyautogui.click()
for j in response_list:
if j == ' ':
pyautogui.press('space')
else:
pyautogui.typewrite(j)
pyautogui.hotkey('enter')
else:
a = genai.res(text)
pyautogui.moveTo(810, 980)
pyautogui.click()
for j in a:
if j == ' ':
pyautogui.press('space')
else:
pyautogui.typewrite(j)
pyautogui.hotkey('enter')
time.sleep(10)