Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gregros/ahk-gutils
Utilities for AHK
https://github.com/gregros/ahk-gutils
Last synced: 9 days ago
JSON representation
Utilities for AHK
- Host: GitHub
- URL: https://github.com/gregros/ahk-gutils
- Owner: GregRos
- Created: 2021-12-23T21:41:48.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2022-03-20T23:22:56.000Z (almost 3 years ago)
- Last Synced: 2024-11-06T10:29:57.578Z (about 2 months ago)
- Language: AutoHotkey
- Size: 337 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# AHK gutils
This repo contains a set of utilities for AHK. Some of these are function versions of commands and others do the same thing, but with a different interface.
Is partially unit tested in `test/gutils.test.ahk`
Include everything by including `gutils`
## Common
Use `gDeclaredMembersOnly` to make it an error to call, set, or get things that haven't been declared during the init phase of an object.
`gOut(whatever)` lets you pipe out `OutputDebug`
`gLang_Equal` - checks for structural equality.
`gLang_StackTraceObj` - Returns a stack trace as an object.
## gArr
`garr.ahk`
Contains utility functions for working with arrays.
`gArr_Map` - Maps array elements with a function.
`gArr_Filter` - Filters array elements with a function.
## gAssert
Utilities for unit testing.
`gAssert_eq(real, expected)` - real is equal to expected.
## gDbg
Some debugging stuff.
1. Register an error handler that makes a better exception popup.
2. Disables calling properties/methods on non-objects## gEx
Exception-related stuff.
`gEx_Throw("whatever")` - throws an exception with extra info.
## gLang
Lang-related stuff.
`gLang_Call(f)` - Calls `f` intelligently.
## gObj
Object-related stuff.
`gObj_Pick(o, "key1", "key2")` - Returns a subset of the object with the given keys.
## gReg
Doesn't work.
## gStr
String utility functions.
`gStr_Repeat(what, count)` - Repeats `what`, `count` times.
## gSys
Misc system related functions.
`gSys_ComInvoker` - Creates an invoker that can be used to invoke COM vtable methods.
## gUtils
includes everything.
## gWin
Window-related functions.
### query
These methods use "WinTitle query objects", which are objects with one or more of the properites:
1. `title`
2. `text`
3. `excludeTitle`
4. `excludeText`This object is used instead of the standard signature when trying to find windows.
### gWinInfo
Calling `gWin_Get(query)` returns an object that stores the `hwnd` of the window, and lets you check its information using methods and properties.