Skip to content

Commit a82415a

Browse files
Merge pull request #197 from ns23k/master
fixes #195
2 parents da8697d + bb57665 commit a82415a

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

pywhatkit/core/core.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,11 @@ def findtextbox() -> None:
3939
location = locateOnScreen(f"{dir_path}\\data\\pywhatkit_smile1.png")
4040
try:
4141
moveTo(location[0] + 150, location[1] + 5)
42+
click()
4243
except Exception:
4344
location = locateOnScreen(f"{dir_path}\\data\\pywhatkit_smile.png")
4445
moveTo(location[0] + 150, location[1] + 5)
45-
click()
46+
click()
4647

4748

4849
def check_connection() -> None:
@@ -74,7 +75,7 @@ def send_message(message: str, receiver: str, wait_time: int) -> None:
7475

7576
_web(receiver=receiver, message=message)
7677
time.sleep(7)
77-
click(WIDTH / 2, HEIGHT / 2)
78+
click(WIDTH / 2, HEIGHT / 2 + 15)
7879
time.sleep(wait_time - 7)
7980
if not check_number(number=receiver):
8081
for char in message:
@@ -132,7 +133,7 @@ def send_image(path: str, caption: str, receiver: str, wait_time: int) -> None:
132133

133134
_web(message=caption, receiver=receiver)
134135
time.sleep(7)
135-
click(WIDTH / 2, HEIGHT / 2)
136+
click(WIDTH / 2, HEIGHT / 2 + 15)
136137
time.sleep(wait_time - 7)
137138
copy_image(path=path)
138139
if not check_number(number=receiver):

pywhatkit/whats.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def sendwhatmsg_instantly(
3232

3333
web.open(f"https://web.whatsapp.com/send?phone={phone_no}&text={quote(message)}")
3434
time.sleep(4)
35-
pg.click(core.WIDTH / 2, core.HEIGHT / 2)
35+
pg.click(core.WIDTH / 2, core.HEIGHT / 2 + 15)
3636
time.sleep(wait_time - 4)
3737
core.findtextbox()
3838
pg.press("enter")

0 commit comments

Comments
 (0)