0
當您按下alt + printscreen(至少在Windows中)時,您會看到當前活動(和可見?)窗口的屏幕截圖。Ruby:窗口打印屏幕win32API調用
如何使用win32Api調用調用此函數?
當您按下alt + printscreen(至少在Windows中)時,您會看到當前活動(和可見?)窗口的屏幕截圖。Ruby:窗口打印屏幕win32API調用
如何使用win32Api調用調用此函數?
Win32::Screenshot
怎麼樣?
https://github.com/jarmo/win32screenshot
gem install win32screenshot
require 'win32/screenshot'
# Take a screenshot of the foreground
Win32::Screenshot::Take.of(:foreground).write("image.png")
# Take a screenshot of the window with the specified title
Win32::Screenshot::Take.of(:window, :title => "Abc").write("image.bmp")
嗯,我寧願Win32API的呼叫如果可能的話。 – MxyL