Skip to content

Commit

Permalink
WinWait requires at least one of the main 4 keys be set.
Browse files Browse the repository at this point in the history
  • Loading branch information
EtorixDev committed Oct 28, 2024
1 parent 1c52299 commit 7cffbd6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ahk/_async/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -3315,6 +3315,10 @@ async def win_wait(
"""
Analog for `WinWait <https://www.autohotkey.com/docs/commands/WinWait.htm>`_
"""
if not title and not text and not exclude_title and not exclude_text:
raise ValueError(
"Expected non-blank value for at least one of the following: title, text, exclude_title, exclude_text"
)
args = self._format_win_args(
title=title,
text=text,
Expand Down
4 changes: 4 additions & 0 deletions ahk/_sync/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -3302,6 +3302,10 @@ def win_wait(
"""
Analog for `WinWait <https://www.autohotkey.com/docs/commands/WinWait.htm>`_
"""
if not title and not text and not exclude_title and not exclude_text:
raise ValueError(
"Expected non-blank value for at least one of the following: title, text, exclude_title, exclude_text"
)
args = self._format_win_args(
title=title,
text=text,
Expand Down

0 comments on commit 7cffbd6

Please sign in to comment.