Process Screenshots

Convert a base64 encoded screenshot to binary data that can be saved to a file.

Parameters

screenshotResponse
AiPromptResponseRequired

The response object from the windows.screenshot method of the Airtop client. This object contains the base64 encoded screenshot data that needs to be processed.

Returns

processedScreenshots
ProcessScreenshotsResponse[]Required

An array of objects, each containing:

success
booleanRequired

Indicates if the screenshot was processed successfully.

binaryData
BufferRequired

The binary data of the screenshot, which can be saved to a file.

mimeType
stringRequired

The MIME type of the screenshot, used to determine the file extension.

index
numberRequired

The index of the screenshot in the batch.

error
string

An error message if the processing failed.

This guide provides examples of how to use the “process screenshots” helper function in both Node.js and Python, demonstrating the steps to take screenshots and process them effectively.