Skip to main content

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

FieldValue
DisplayGet Last Screenshot Status
Categoryscreenshot
AccessPublic
ScopeB1Standalone
TagsExperimental
Aliases—

Parameters

  • This command takes no parameters.

Returns

Returns a JSON object with the following fields:

FieldTypeRequiredDescription
has_requestboolyesFalse if screenshot.capture has never run in this process; all other fields are then absent
pathstringnoAbsolute path of the pending or completed screenshot
directorystringnoAbsolute directory portion of path
filenamestringnoFile name portion of path
savedboolnoTrue once the file is fully written and non-empty
pendingboolnoTrue while the engine still owes a capture frame
size_bytesintnoSize of the file on disk, 0 if not written yet
elapsed_secfloatnoSeconds since the capture was requested
show_uiboolnoWhether the request included the game UI

Usage

await inzoi.cli.execute('screenshot.get_last');