Skip to content

Commit

Permalink
Merge pull request #592 from HarishChandran3304/master
Browse files Browse the repository at this point in the history
Fix Issue #559
  • Loading branch information
asweigart authored Jul 8, 2021
2 parents 9de7b3e + 2808700 commit 5e4acb8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pyautogui/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,13 @@ def _normalizeXYArgs(firstArg, secondArg):
"""
if firstArg is None and secondArg is None:
return position()


elif firstArg is None and secondArg is not None:
return Point(int(position()[0]), int(secondArg))

elif secondArg is None and firstArg is not None:
return Point(int(firstArg), int(position()[1]))

elif isinstance(firstArg, str):
# If x is a string, we assume it's an image filename to locate on the screen:
try:
Expand Down

0 comments on commit 5e4acb8

Please sign in to comment.