Results 1 to 4 of 4

Thread: Screen shot using JavaScript

  1. #1
    Join Date
    Nov 2009
    Posts
    1,118

    Screen shot using JavaScript

    Hi,

    I am having a problem with the coding of the .NET programming language using the JavaScript. I am working on the project that will take the screen shot of the screen's particular area using the JavaScript, but i am unable to do so. For making my project working i used Graphics.CopyFromScreen functionality of the .NET, but could not find to the result.

    Thank you

  2. #2
    Join Date
    Apr 2008
    Posts
    4,642

    Re: Screen shot using JavaScript

    What i got from the description is that you are interested in taking the shot of the screen's particular area using the JavaScript.For that i will suggest you to use ActiveX control which is known as the ActiveScreen for capturing the particular screen area.

    Here is the code for the same.

    Code:
    var as=new ActiveXObject("ActiveScreen.Capturer");
    as.CaptureScreen();
    var fs=as.SaveToFile("Screenshot1.jpg");
    WScript.Echo("Size of the image = " + fs.toString() + "\r");
    This code will capture the complete screen and save it to the other format. Hope that this will help you.

    Thanks

  3. #3
    Join Date
    May 2008
    Posts
    4,345

    Re: Screen shot using JavaScript

    Hi there,

    I am having the same problem regarding the capturing of the screen's area and searched a lot and finally got the answer. Hope that the solution which i got might be help you also so try your luck for the same. The code will capture the particular area of the screen defined by the user. Use this to resolve your issue. This will save the file in the .png format

    The code is given below:

    Code:
    var as=new ActiveXObject("ActiveScreen.Capturer");
    as.CaptureOval(100,50, 400);
    var fs=as.SaveToFile("Capture.png");
    WScript.Echo("Size = " + fs.toString() + "\n");

  4. #4
    Join Date
    May 2008
    Posts
    4,831

    Re: Screen shot using JavaScript

    Hello,

    I hope this will disappoint you that it can not be possible with the JavaScript because JavaScript can not uses binary stream. If you want to make rendering tests then you use instantiating the target browsers with the host environment. Thats all i know about the screen shot taking process. So i am hoping that this will you to finalize your project.

    Thanks

Similar Threads

  1. Replies: 6
    Last Post: 05-02-2012, 04:44 PM
  2. How to take a screen shot in Samsung focus s 4G
    By K@ttY in forum Portable Devices
    Replies: 4
    Last Post: 22-01-2012, 09:40 AM
  3. Replies: 9
    Last Post: 29-12-2011, 07:17 AM
  4. How to take Screen shot in HTC Desire?
    By hostess in forum Portable Devices
    Replies: 4
    Last Post: 20-01-2011, 11:45 AM
  5. How do i take out screen shot of boot screen
    By Dharmesh Arora in forum Windows Software
    Replies: 5
    Last Post: 15-04-2009, 03:45 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,751,691,371.30667 seconds with 16 queries