-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAuto_Dual_Call.py
120 lines (91 loc) · 2.71 KB
/
Auto_Dual_Call.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
import pyautogui
import subprocess
import PySimpleGUI as sg
import time
timer1=input('ADD TIMER::')
timer1=int(timer1)
add_number1=input('ADD NUMBER HERE::')
timer2=input('ADD TIMER::')
timer2=int(timer2)
add_number2=input('ADD NUMBER HERE::')
pyautogui.FailSafeException = False
def phone_number_1(number_1):
url = f"whatsapp://send?phone=+91{number_1}"
subprocess.Popen(["cmd", "/C", f"start {url}"], shell=True)
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')
#This is timer
time.sleep(timer1*60)
subprocess.call("TASKKILL /F /IM whatsapp.exe", shell=True)
time.sleep(2)
#Unlock
pyautogui.hotkey('ctrl', 'alt', 'z')
#Cut call
#time.sleep(1)
#button_location1 = pyautogui.locateCenterOnScreen('end_button.png')
# Click the button
#time.sleep(1)
#pyautogui.click(button_location1)
#stop Recording
time.sleep(2)
pyautogui.press('f12')
time.sleep(2)
def phone_number_2(number_2):
url = f"whatsapp://send?phone=+91{number_2}"
subprocess.Popen(["cmd", "/C", f"start {url}"], shell=True)
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')
#This is timer
time.sleep(timer2*60)
subprocess.call("TASKKILL /F /IM whatsapp.exe", shell=True)
#Cut call
#time.sleep(1)
#button_location1 = pyautogui.locateCenterOnScreen('end_button.png')
# Click the button
#time.sleep(1)
#pyautogui.click(button_location1)
if timer2<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')]