screenshot.get_last
Overview
- Returns the status of the most recent screenshot.capture issued in this process: where it is being written, whether the engine has finished writing it, and how long it has taken. Poll this after screenshot.capture until saved == true, then read the file at 'path'. pending == true means the engine has not rendered the capture frame yet — that is normal for the first poll, and can persist for seconds during a map load or while the window is minimised. Cheap to call: the response is a fixed handful of fields, so polling costs almost nothing.
Metadata
| Field | Value |
|---|---|
| Display | Get Last Screenshot Status |
| Category | screenshot |
| Access | Public |
| Scope | B1Standalone |
| Tags | Experimental |
| Aliases | — |
Parameters
- This command takes no parameters.
Returns
Returns a JSON object with the following fields:
| Field | Type | Required | Description |
|---|---|---|---|
has_request | bool | yes | False if screenshot.capture has never run in this process; all other fields are then absent |
path | string | no | Absolute path of the pending or completed screenshot |
directory | string | no | Absolute directory portion of path |
filename | string | no | File name portion of path |
saved | bool | no | True once the file is fully written and non-empty |
pending | bool | no | True while the engine still owes a capture frame |
size_bytes | int | no | Size of the file on disk, 0 if not written yet |
elapsed_sec | float | no | Seconds since the capture was requested |
show_ui | bool | no | Whether the request included the game UI |
Usage
await inzoi.cli.execute('screenshot.get_last');