this and A_Args
The call context carries a command's identity and, for mouse triggers, information about the original target window. Values are generally strings.
Function bodies
ini
[show_context]
type=f
code='''
text := this["name"]
if this.Has("title")
{
text .= "`n" this["title"]
}
MsgBox(text)
'''Use this["field"] for the current call. A pooled interpreter's A_Args describes its host initialization rather than each function call.
Complete scripts
ahk
;? type=e,read=1
MsgBox(A_Args["name"])
ExitApp()Diatom initializes A_Args as a string map for a complete script.
Common fields
| Fields | Meaning |
|---|---|
| name, type | Command identity and execution mode |
| src, sid | Definition source and internal identifier |
| from, tid, time | Call source, call identifier and internal timing |
| id | Top-level target window handle |
| hwnd | Pointed control or window handle |
| title, exe, class, path, line | Target window and process information |
| dx, dy | Mouse-down screen coordinates |
| ux, uy | Mouse-up screen coordinates |
Keyboard, startup and task entries do not supply every mouse field. Down-stage calls have no release coordinates. The time field uses internal timing units.
in_info=1 copies matching information with an in_ prefix on the supported mouse path. no_fs suppresses its regular context fill. Accessibility and browser fields depend on the current provider.