Introduction Interfaces Buy Support More ActiveX Site Home

ActiveScreen --- Support


Usage Samples
// Cature the whole screen and save to a jpg file
var as=new ActiveXObject("ActiveScreen.Capturer");
as.CaptureScreen();
var fs=as.SaveToFile("test1.jpg");
WScript.Echo("Image Size = " + fs.toString() + "\r\n");
// Cature the forground window and save to a gif file
var as=new ActiveXObject("ActiveScreen.Capturer");
as.CaptureActiveWindow();
var fs=as.SaveToFile("test2.gif");
WScript.Echo("Image Size = " + fs.toString() + "\r\n");
// Cature a rectangle of the screen and save to a png file
var as=new ActiveXObject("ActiveScreen.Capturer");
as.CaptureRect(200, 200, 400, 300);
var fs=as.SaveToFile("test3.png");
WScript.Echo("Image Size = " + fs.toString() + "\r\n");
// Use ActiveScreen in a Web page
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" content="text/html; charset=iso-8859-1">
<TITLE>Sample: Use ActiveScreen In a Web Page</TITLE>

<SCRIPT LANGUAGE="JAVASCRIPT">
function capit()
{
var as=new ActiveXObject("ActiveScreen.Capturer");
as.CaptureURL(url.value, width.value);
if(as.SaveToFile("c:\\asweb.gif"))
    {
    scrn.src="c:\\asweb.gif";
    scrn.style.visibility="visible";
    }
}
</script>
</HEAD>

<BODY>
<h3>Sample: Use ActiveScreen In A Web Page</h3>
<hr size="1">
<table width="100%" border="0">
<tr>
<td width="32" align="right">URL:</td>
<td><input type="text" id="url" value="http://www.xuebrothers.net" style="width:100%"></td>
<td width="32"> </td>
<td width="32" align="right">Width:</td>
<td width="80"><input type="text" id="width" value="600" style="width:100%"></td>
<td width="32"> </td>
<td width="80"><input type="button" value="Capture" onclick="capit();"></input></td>
</tr>
</table>
<hr size="1">
<img id="scrn" style="visibility:hidden" src="c:\\asweb.gif">

</BODY>
</HTML>

Our support email address is support@xuebrothers.net

Let us know if you have any problem or question in downloading, or using ActiveScreen. You will get our reply on the second business day. Also, we welcome your comments, suggestions.

To Licensed Users

You can also send us your questions about the JavaScript or VBScript language and programming.


See Also

Services