Skip to content

Commit

Permalink
Merge pull request #267 from spyoungtech/testing
Browse files Browse the repository at this point in the history
SendMode feature and key_wait fix
  • Loading branch information
spyoungtech authored Mar 9, 2024
2 parents a89a5f5 + 0a57784 commit 8d2e921
Show file tree
Hide file tree
Showing 16 changed files with 722 additions and 104 deletions.
60 changes: 60 additions & 0 deletions .github/ISSUE_TEMPLATE/00_bug.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: bug report
description: something went wrong
body:
- type: markdown
attributes:
value: |
Please use this issue template to report bug behavior
- type: textarea
id: what-happened
attributes:
label: describe your issue
description: Please describe the problem, the expected behavior, and the actual behavior
placeholder: |
I was doing ...
I ran ...
I expected ...
I got ...
validations:
required: true
- type: input
id: library-version
attributes:
label: ahk.__version__
placeholder: 1.x.x
validations:
required: false
- type: input
id: ahk-version
attributes:
label: AutoHotkey version
placeholder: v1 or v2
validations:
required: false
- type: textarea
id: code
attributes:
label: Code to reproduce the issue
description: Minimal Python code that can be used to reproduce the issue. (no backticks needed)
placeholder: |
from ahk import AHK
ahk = AHK()
ahk.do_something()
render: python
validations:
required: false
- type: textarea
id: error-log
attributes:
label: 'Traceback/Error message'
description: The full traceback/error you receive or other error information, if applicable
placeholder: |
Traceback (most recent call last):
File "C:\path\to\yourscript.py", line 3, in <module>
ahk.failure()
File "C:\path\to\site-packages\ahk\_sync\engine.py", line 220, in __getattr__
raise AttributeError(f'{self.__class__.__name__!r} object has no attribute {name!r}')
AttributeError: 'AHK' object has no attribute 'failure'
validations:
required: false
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/01_feature.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: feature request
description: something new
body:
- type: markdown
attributes:
value: |
Use this form to create feature requests
- type: checkboxes
attributes:
label: Checked the documentation
description: |
The documentation contains information about features that are already implemented. Please check this first before making a request.
(requests for features marked as "Not Implemented" in the documentation are OK, but please provide context on how you want to use this feature).
options:
- label: I have checked [the documentation](https://ahk.readthedocs.io/en/latest/api/methods.html) for the feature I am requesting
required: true


- type: textarea
id: freeform
attributes:
label: describe your feature request
placeholder: |
I want to do ...
I tried ...
It does not work because ...
This feature would be useful because ...
Additional information can be found at https://www.autohotkey.com/docs/ ...
validations:
required: true
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: documentation
url: https://ahk.readthedocs.io/en/latest/
about: See the full documentation
108 changes: 79 additions & 29 deletions ahk/_async/engine.py

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion ahk/_async/transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ def result(self, timeout: Optional[float] = None) -> T_SyncFuture:
'AHKGetClipboardAll',
'AHKGetCoordMode',
'AHKGetSendLevel',
'AHKGetSendMode',
'AHKGetTitleMatchMode',
'AHKGetTitleMatchSpeed',
'AHKGetVolume',
Expand Down Expand Up @@ -125,6 +126,7 @@ def result(self, timeout: Optional[float] = None) -> T_SyncFuture:
'AHKSetCoordMode',
'AHKSetDetectHiddenWindows',
'AHKSetSendLevel',
'AHKSetSendMode',
'AHKSetTitleMatchMode',
'AHKSetVolume',
'AHKShowToolTip',
Expand Down Expand Up @@ -422,7 +424,7 @@ async def function_call(self, function_name: Literal['AHKClick'], args: Optional
@overload
async def function_call(self, function_name: Literal['AHKMouseClickDrag'], args: Optional[List[str]] = None, *, blocking: bool = True, engine: Optional[AsyncAHK[Any]] = None) -> Union[None, AsyncFutureResult[None]]: ...
@overload
async def function_call(self, function_name: Literal['AHKKeyWait'], args: Optional[List[str]] = None, *, blocking: bool = True, engine: Optional[AsyncAHK[Any]] = None) -> Union[int, AsyncFutureResult[int]]: ...
async def function_call(self, function_name: Literal['AHKKeyWait'], args: Optional[List[str]] = None, *, blocking: bool = True, engine: Optional[AsyncAHK[Any]] = None) -> Union[bool, AsyncFutureResult[bool]]: ...
@overload
async def function_call(self, function_name: Literal['SetKeyDelay'], args: Optional[List[str]] = None, *, blocking: bool = True, engine: Optional[AsyncAHK[Any]] = None) -> Union[None, AsyncFutureResult[None]]: ...
@overload
Expand Down Expand Up @@ -540,6 +542,10 @@ async def function_call(self, function_name: Literal['AHKSetCoordMode'], args: L
@overload
async def function_call(self, function_name: Literal['AHKGetSendLevel']) -> int: ...
@overload
async def function_call(self, function_name: Literal['AHKSetSendMode'], args: List[str]) -> None: ...
@overload
async def function_call(self, function_name: Literal['AHKGetSendMode']) -> str: ...
@overload
async def function_call(self, function_name: Literal['AHKSetSendLevel'], args: List[str]) -> None: ...
@overload
async def function_call(self, function_name: Literal['AHKWinWait'], args: Optional[List[str]] = None, *, blocking: bool = True, engine: Optional[AsyncAHK[Any]] = None) -> Union[AsyncWindow, AsyncFutureResult[AsyncWindow]]: ...
Expand Down
Loading

0 comments on commit 8d2e921

Please sign in to comment.