Examples#
Example 01 - Creating screenshots#
1import hw
2
3sess = hw.Session()
4win_list = sess.getWindows()
5
6capture = hw.CaptureImageTool()
7capture.type = 'jpg'
8capture.width = 1200
9capture.height = 800
10
11for i, win in enumerate(win_list):
12 sess.setActive(hw.Window,window=win)
13 capture.file=f"C:/Temp/screenshot_{i+1}"
14 capture.capture()