on a mac,
I can use a builtin system call to take a screenshot of my dlg using it’s position and size…
# screencapture -R top_left_x, top_left_y, width, height, image_path %x[screencapture -R100,100,1024,1024 /tmp/outfile.jpg]
it seems on windows I could possibly use a gem to achieve the same…
require 'win32/screenshot' # Take a screenshot of the window with the specified title, client area (e.g. without title bar) Win32::Screenshot::Take.of(:window, title: 'my_dlg', context: :client) .write("c:/tmp/outfile.jpg")
has anyone tried this gem in SU?