-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAuto_Connect&Cut_V1.py
70 lines (50 loc) · 1.4 KB
/
Auto_Connect&Cut_V1.py
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
68
69
70
import pyautogui
import subprocess
import PySimpleGUI as sg
import time
timer=9 #Add Time Here
add_number=9573233105 #Add Number & Press F5
def phone_number(number):
url = f"whatsapp://send?phone=+91{number}"
subprocess.Popen(["cmd", "/C", f"start {url}"], shell=True)
phone_number(add_number)
time.sleep(0.25)
phone_number(add_number)
time.sleep(1)
while True:
try:
button_location = pyautogui.locateOnScreen('call_button.png')
button_center = pyautogui.center(button_location)
pyautogui.click(button_center.x, button_center.y)
break
except:
time.sleep(1)
continue
time.sleep(2)
pyautogui.hotkey('win', 'up')
#Start recording
time.sleep(30)
pyautogui.press('f12')
#Puts First LK
time.sleep(5)
pyautogui.hotkey('ctrl', 'alt', 'z')
#button_location1 = pyautogui.locateCenterOnScreen('end_button.png')
# Click the button
#time.sleep(0.5)
#pyautogui.click(button_location1)
#This is timer
time.sleep(timer*60)
subprocess.call("TASKKILL /F /IM whatsapp.exe", shell=True)
if timer<9:
#Unlock
time.sleep(1)
pyautogui.hotkey('ctrl', 'alt', 'z')
#stop Recording
time.sleep(2)
pyautogui.press('f12')
#Final Lock
time.sleep(2)
pyautogui.hotkey('ctrl', 'alt', 'z')
time.sleep(1)
sg.theme('NeutralBlue')
layout=[sg.popup('TIME OUT',font='stencil 50')]