$screenshot » History » Version 9
Per Amundsen, 02/23/2023 07:43 PM
1 | 1 | Per Amundsen | _Added in 1.9.6_ |
---|---|---|---|
2 | |||
3 | 9 | Per Amundsen | *$screenshot(filename, [options], [x, y, w, h], N)* |
4 | 1 | Per Amundsen | |
5 | Takes and saves a screenshot of the desktop or current active window to filename. |
||
6 | |||
7 | *Parameters* |
||
8 | |||
9 | 8 | Per Amundsen | table(ktable). |
10 | |*Parameter*|*Description*| |
||
11 | 1 | Per Amundsen | | filename | Filname to save to. | |
12 | 9 | Per Amundsen | | [options] | Screenshot options. (optional) | |
13 | | [x, y, w, h] | The position and size of a rectangle to save. (use with the 'z' parameter) | |
||
14 | | N | Compression quality (0-100) | |
||
15 | 1 | Per Amundsen | |
16 | 9 | Per Amundsen | *Options* |
17 | 1 | Per Amundsen | |
18 | 9 | Per Amundsen | table(ktable). |
19 | |*Option*|*Description*| |
||
20 | | a | Take screenshot of active window. | |
||
21 | | b | Save as bmp image. | |
||
22 | | e | Save as Emf image. | |
||
23 | | g | Save as gif image. | |
||
24 | | i | Save as icon image. | |
||
25 | | j | Save as jpeg image. | |
||
26 | | p | Save as png image. | |
||
27 | | r | Select an area of the screen to save. (Use CTRL + S to save when done) | |
||
28 | | t | Save as tiff image. | |
||
29 | | w | Save as wmf image. | |
||
30 | | x | Save as exif image. | |
||
31 | | z | Select and save a rectangle [x, y, w, h] of the screen. | |
||
32 | 1 | Per Amundsen | |
33 | *Example* |
||
34 | 6 | Per Amundsen | |
35 | <pre> |
||
36 | ; Takes a screenshot of current active window and saves it as a png image, then opens the image. |
||
37 | //run $qt($screenshot(screenshot.png, pa)) |
||
38 | |||
39 | 1 | Per Amundsen | ; Show a transparent form where you can draw a rectangle and save it as a png image, then opens the image. |
40 | //run $qt($screenshot(screenshot.png, pr)) |
||
41 | </pre> |