PyGB
=========
PyGB (Py-GUI-Background) is a fork of the PyAutoGUI to support background keyboard and mouse events to a specific window.
### Getting Started
Everything is the same as in the original PyAutoGUI, except for each function you can add a `window` argument to specify the window to send the event to (the window can be inactive, running in the background).
If the `window` argument is not specified, the event will be sent to the global event tap (same as original PyAutoGUI).
```python
import pygb
# Press key to a specific window
pygb.keyDown('a', window=859)
pygb.keyUp('a', window=859)
# Take screenshot of a specific window
img = pygb.screenshot('a', window=859)
```
## Window APIs
### `pygb.getWindows()`
- returns a list of windows with their title
### Window resizing
- `win.resize(width, height)` - resize a window to a specific size: https://stackoverflow.com/questions/70535283/how-can-i-resize-terminal-window-from-python
### References
- [cocoa-vanilla](https://github.com/robotools/vanilla): a Python library for building Cocoa GUIs on macOS
- [ahk-python](https://github.com/spyoungtech/ahk)
Raw data
{
"_id": null,
"home_page": "https://github.com/danalites/pygb",
"name": "PyGB",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "gui automation test testing keyboard mouse cursor click press keystroke control",
"author": "Al Sweigart, and other contributors",
"author_email": "al@inventwithpython.com",
"download_url": "https://files.pythonhosted.org/packages/21/25/5a8495efa6e500c8350df151587a75b0d6a95651fe73315a41df74fee0a8/PyGB-0.9.54.tar.gz",
"platform": null,
"description": "PyGB\n=========\n\nPyGB (Py-GUI-Background) is a fork of the PyAutoGUI to support background keyboard and mouse events to a specific window.\n\n### Getting Started\nEverything is the same as in the original PyAutoGUI, except for each function you can add a `window` argument to specify the window to send the event to (the window can be inactive, running in the background).\n\nIf the `window` argument is not specified, the event will be sent to the global event tap (same as original PyAutoGUI).\n\n```python\nimport pygb\n\n# Press key to a specific window\npygb.keyDown('a', window=859)\npygb.keyUp('a', window=859)\n\n# Take screenshot of a specific window\nimg = pygb.screenshot('a', window=859)\n```\n\n## Window APIs\n\n### `pygb.getWindows()` \n- returns a list of windows with their title\n\n### Window resizing \n- `win.resize(width, height)` - resize a window to a specific size: https://stackoverflow.com/questions/70535283/how-can-i-resize-terminal-window-from-python\n\n### References\n- [cocoa-vanilla](https://github.com/robotools/vanilla): a Python library for building Cocoa GUIs on macOS\n- [ahk-python](https://github.com/spyoungtech/ahk)\n",
"bugtrack_url": null,
"license": "BSD",
"summary": "PyGB lets Python control the mouse and keyboard, and other GUI automation tasks. For Windows, macOS, and Linux, on Python 3 and 2.",
"version": "0.9.54",
"split_keywords": [
"gui",
"automation",
"test",
"testing",
"keyboard",
"mouse",
"cursor",
"click",
"press",
"keystroke",
"control"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "21255a8495efa6e500c8350df151587a75b0d6a95651fe73315a41df74fee0a8",
"md5": "5c97d08efdccc14ddf55288245756771",
"sha256": "63d61665219fcc36e209a4f3b1a5fff4a02d2fcf050e57b595fff4053ca9ab2e"
},
"downloads": -1,
"filename": "PyGB-0.9.54.tar.gz",
"has_sig": false,
"md5_digest": "5c97d08efdccc14ddf55288245756771",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 63283,
"upload_time": "2023-04-07T02:58:44",
"upload_time_iso_8601": "2023-04-07T02:58:44.405076Z",
"url": "https://files.pythonhosted.org/packages/21/25/5a8495efa6e500c8350df151587a75b0d6a95651fe73315a41df74fee0a8/PyGB-0.9.54.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-04-07 02:58:44",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "danalites",
"github_project": "pygb",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"tox": true,
"lcname": "pygb"
}