Vizard 7 » Reference » Application window » Taking screenshots & screen videos
7.7

Taking screenshots and videos

Taking screenshots

To get a screenshot of the graphics window, use viz.window.screenCapture(<image filename>).

#Hit the 's' key for a screen capture.
#Save that files as 'image.bmp'.
vizact.onkeydown( 's', viz.window.screenCapture, 'image.bmp' )

You can also press Ctrl+F9 while your script is running to create a screenshot. The screenshot will be saved in the current script directory with the filename "vizard-<year><month><day>-<time>.bmp". Since the filename is time stamped, you can take multiple screenshots without having them overwrite each other.

Recording videos of the screen

To record 'avi' video files of the screen use viz.window.startRecording and viz.window.stopRecording (or viz.window.toggleRecording). Note: Vizard will adjust the screen to the maximum recording size for the avi.

vizact.onkeydown('b', viz.window.startRecording, 'test.avi' )
vizact.onkeydown('e', viz.window.stopRecording )

You can also press Ctrl+F12 while your script is running to toggle AVI recording. The video will be saved in the current script directory with the filename "vizard-<year><month><day>-<time>.avi".

 

You can use the following option strings to configure the AVI recorder:

Option name

Description

Default value

viz.AVIRecorder.maxWidth

Maximum video width

640

viz.AVIRecorder.maxHeight

Maximum video height

480

viz.AVIRecorder.fps

Video framerate

30

viz.AVIRecorder.drawCursor

Draw mouse cursor in video (0 or 1)

0

Note: Videos are recorded uncompressed, which means the file size will grow very large very quickly. Make sure you have enough hard drive space before recording.

See also

In this section:

Application window basics

Application Command Table

Other sections:

Video Basics

Recording sound with vizmic