Class ScreenCapture

java.lang.Object
uno.anahata.ai.swing.tools.spi.ScreenCapture

public class ScreenCapture extends Object
Tool provider for capturing screenshots of the host system and application windows.
  • Constructor Details

    • ScreenCapture

      public ScreenCapture()
  • Method Details

    • takeDeviceScreenshot

      public static String takeDeviceScreenshot(int deviceIdx) throws Exception
      Takes a screenshot of a specific graphics device.
      Parameters:
      deviceIdx - The index of the device to capture.
      Returns:
      The absolute path to the captured screenshot file.
      Throws:
      Exception - if the capture fails.
    • attachWindowCaptures

      public static MultiPartResponse attachWindowCaptures() throws IOException
      Takes a screenshot of all visible application windows.
      Returns:
      A MultiPartResponse containing the paths to the captured screenshots.
      Throws:
      IOException - if the capture fails.