Screen Capture Script Function Library

 

This plug-in can be used to capture screens in Intouch Viewer, through scripting. Currently the plugin support capturing Viewer screen, primary display monitor or all monitors. When capturing images, Viewer does not need to run in the foreground, nor does it need to add additional windows in project.

  1. WWScnCapture() Function
    Capture the primary display monitor screen to an individual image file. Only BMP file support.
  2. WWCaptureScreen() Function
    Capture Viewer screen, primary display monitor or all monitors to an individual image file. Bmp, Jpg and Png image format are supported, compression of Jpg and Png are also supported.
  3. WWCaptureScreenRect() Function
    Capture Viewer screen, primary display monitor or all monitors to an individual image file with specific boundary. Bmp, Jpg and Png image format are supported, compression of Jpg and Png are also supported.
  4. WWCaptureScreenSetKey() Function
    Set the license key for wwScnCapture plugin.

 

WWScnCapture() Function

Capture the Screen to an individual image file. Only BMP file support.

Syntax

result = WWScnCapture(filename)

Parameters

filename

The path name and file name of the picture to store. A literal string value, message tagname, or string expression. UNC path names are supported.

Remarks

Do not save the image file to the directory which the Intouch don’t have the write privilege, especially in Window 7 and above.

Return Value

A value indicating success or failure of the image capture:

1 – file is capture successfully

0 – file is not capture successfully. Possible causes by the system privilege problem.

Example(s)

This script capture the screen to the file c:\1.bmp and returns 1 if the capture operation is done.

Status= WWScnCapture(“c:\1.bmp”);

 

WWCaptureScreen() Function

Capture Viewer screen, primary display monitor or all monitors to an individual image file. Bmp, Jpg and Png image format are supported, compression of Jpg and Png are also supported.

Syntax

result = WWCaptureScreen( source, format, compression, filename)

Parameters 

Source

The capture source, 0:Intouch viewer, 1:virtual screen, 2:primary display.

A literal number, analog tagname, or numeric expression.

0: Only capture the window of Intouch viewer.

1: The virtual screen is the bounding rectangle of all display monitors.

2: The client area for a full-screen window on the primary display monitor. 

Format

Image format, 0:bmp, 1:jpg, 2:png. A literal number, analog tagname, or numeric expression. A literal number, analog tagname, or numeric expression. 

Compression

The compression quality, bmp: this value is ignored, jpg:1-100, png: 0..9. A literal number, analog tagname, or numeric expression. 

Filename

The path name and file name of the picture to store. A literal string value, message tagname, or string expression. UNC path names are supported.

Remarks

Run this function need a plugin license, without license, the picture will be watermarked.

Do not save the image file to the directory which the Intouch don’t have the write privilege, especially in Window 7 and above.

Use Compression to set the compression quality of the JPEG image and PNG image when writing out an image. Higher compression results in a poorer picture quality, but a smaller file size.

For JPEG image, the higher the compression value (up to a maximum of 100), the better the image quality, but the larger the file size. The lower the compression value (to a minimum of 1), the smaller the resulting file size, but at the expense of picture quality.

For PNG image, compression can have values that range from 0 to 9. A zero value means that no compression is used, while 9 means that full compression is used.

Use WWCaptureScreenRect to cut a picture before it save to disk.

Return Value

A value indicating success or failure of the image capture:

0 – file is capture successfully

None zero means the capture is not successfully. Possible causes by the system privilege problem.

Example(s)

This script capture the Viewer screen to the file c:\1.bmp and returns 0 if the capture operation is done, the image’s size is Viewer’s size.

Status= WWScnCapture(0, 0, 0, “c:\1.bmp”); 

This script capture the all monitors to the file c:\1.jpg and returns 0 if the capture operation is done, the image’s format is JPG, without best quality.

Status= WWScnCapture(1, 1, 0, “c:\1.jpg”);

 

WWCaptureScreenRect() Function

Capture Viewer screen, primary display monitor or all monitors to an individual image file with specific boundary. Bmp, Jpg and Png image format are supported, compression of Jpg and Png are also supported.

Syntax

result = WWCaptureScreenRect( source, format, compression, filename, left, top,  right, bottom )

Parameters 

Source

The capture source, 0:Intouch viewer, 1:virtual screen, 2:primary display.

A literal number, analog tagname, or numeric expression.

0: Only capture the window of Intouch viewer.

1: The virtual screen is the bounding rectangle of all display monitors.

2: The client area for a full-screen window on the primary display monitor. 

Format

Image format, 0:bmp, 1:jpg, 2:png. A literal number, analog tagname, or numeric expression. 

Compression

The compression quality, bmp: this value is ignored, jpg:1-100, png: 0..9. A literal number, analog tagname, or numeric expression. 

Filename

The path name and file name of the picture to store. A literal string value, message tagname, or string expression. UNC path names are supported. 

Left

Specifies the left edge of the image. Use the Left property to specify the left edge of the image. A literal number, analog tagname, or numeric expression. 

Top

Specifies the top edge of the image. Use the Top property to specify the top edge of the image. A literal number, analog tagname, or numeric expression. 

Right

Specifies the right edge of the image. Use the Right property to specify the right edge of the image. A literal number, analog tagname, or numeric expression. 

bottom

Specifies the bottom edge of the image. Use the Bottom property to specify the bottom edge of the image. A literal number, analog tagname, or numeric expression.

Remarks

Run this function need a plugin license, without license, the picture will be watermarked. 

Do not save the image file to the directory which the Intouch don’t have the write privilege, especially in Window 7 and above.

Use Compression to set the compression quality of the JPEG image and PNG image when writing out an image. Higher compression results in a poorer picture quality, but a smaller file size.

For JPEG image, the higher the compression value (up to a maximum of 100), the better the image quality, but the larger the file size. The lower the compression value (to a minimum of 1), the smaller the resulting file size, but at the expense of picture quality.

For PNG image, compression can have values that range from 0 to 9. A zero value means that no compression is used, while 9 means that full compression is used.

Use Left,Top,Right and Bottom to change the saved image’s boundary properties.

Return Value

A value indicating success or failure of the image capture:

0 – file is capture successfully

None zero means the capture is not successfully. Possible causes by the system privilege problem.

Example(s)

This script capture the Viewer screen to the file c:\1.bmp and returns 0 if the capture operation is done, the image’s size is 40 X 40, which cut from left:10,Top:10, width and height is 40.

Status= WWScnCapture(0, 0, 0, “c:\1.bmp”, 10, 10, 50, 50); 

This script capture the all monitors to the file c:\1.png and returns 0 if the capture operation is done, the image’s format is PNG without compress, size is 100 X 130, which cut from left:10,Top:20, width is 100 and height is 130.

Status= WWScnCapture(1, 2, 0, “c:\1.png”, 10, 20, 110, 150);

 

WWCaptureScreenSetKey() Function

Set the license key for wwScnCapture plugin.

Syntax

result = WWCaptureScreenSetKey(licensekey)

Parameters

licensekey

The license key. A literal string value, message tagname, or string expression.

Valid key format is AAAA-BBBB-CCCC-DDDD-EEEE-FFFF-GGGG-HHHH and AAAABBBBCCCCDDDDEEEEFFFFGGGGHHHH.

Remarks

This function should be called each time viewer is restarted to license the plugin.

Return Value

A value indicating success or failure of the image capture:

1 – set license successfully

0 – set license fail.

Example(s)

Status= WWCaptureScreenSetKey(“AAAABBBBCCCCDDDDEEEEFFFFGGGGHHHH”);

ScnCapture2.0.8581.41993.zip (970 downloads )

 

Purchase License key

Leave a Reply

Your email address will not be published. Required fields are marked *

5 × = 35