capture screen

new BookmarkLockedFalling
marcioc
Junior Member
**

marcioc Avatar

Posts: 60

StefanPendl
Global Moderator
*****

StefanPendl Avatar

Run for BASIC ...
Posts: 945

[b]Stefan[/b] - [a href=http://stefanpendl.runbasichosting.com/]Homepage[/a][br][br][b]Please give credit if you use code I post, no need to ask for permission.[/b][br][br]Run BASIC 1.01, Fire-/Waterfox (IE11, Edge), Windows 10 Professional x64, Intel Core i7-4710MQ 2.5GHz, 16GB RAM
Carl Gundel - admin
Administrator
*****

Carl Gundel - admin Avatar

Posts: 550

Post by Carl Gundel - admin on Nov 11, 2008 12:38:33 GMT -5

StefanPendl Avatar
Capturing the screen from within a web page might be considered malicious code, so you might not find a script to do it.

RB does not support this.

Yeah, I would imagine that it isn't possible to do this in a web application because this would be considered a security hole that would allow web sites to capture personal data from the user's computer.

-Carl
marcioc
Junior Member
**

marcioc Avatar

Posts: 60

Post by marcioc on Nov 11, 2008 17:49:52 GMT -5

I know that it is malicious to capture an image from a remote station; however, I do not see any malicious code to capture images from my own server.
I developed an application in RB to remotely monitor my pet while I am working. I turn my camera on displaying the images on the screen and SNAGIT captures screens every 5 seconds and records these images in a specific directory. The RB application scans the directory and displays the images recorded by SNAGIT, deleting these images after displaying it. The application works well; however the synchronization between my application and SNAGIT is not the best. If my application could capture and display the screen, the synchronization would be perfect.

Thanks anyway.

Marcio.
.
tenochtitlanuk
New Member
*

tenochtitlanuk Avatar

Posts: 25

Post by tenochtitlanuk on Dec 19, 2008 6:38:51 GMT -5

Running LB & RB in parallel makes it very easy to grab a screen in LB, save it as a jpg ideally to RAMdisk, & then use it with RB to create a page viewable anywhere in the world.
See atschool.eduweb.co.uk/taunton/LB/indexlb.html where there is a link near the top- 'tho my server is not often 'open to the world' at present. It includes a RAM-disk installer and the pct_dll.dll that mike_ukmid introduced me to.


' LB side of LB-RB data-passing ing via 'R:/screen.jpg'.
' RB running on the server on the same machine can insert the screengrab
' onto any served-up pages.

' You set up a RamDisk R: and at timed intervals put in it a screengrab as a jpg
' The rest of the time this program sleeps.

' Close the mini-window at top LH screen when you want it to stop updating.

' You also need pct_dll.dll in the system dir or same as this prog is in.
' http://www.vfug.org/files/pct_dll.zip

' Interestingly, kill needs backslash but the dll accepts forward or back.
' (Haven't tried on the Linux server yet.)

nomainwin

WindowWidth = 10
WindowHeight = 2
UpperLeftX = 1
UpperLeftY = 1

open "LB" for graphics as #main

print #main, "trapclose [quit.main]"
hW =hwnd( #main)
calldll #user32, "GetParent", hW as long, hP as long
open "pct_dll.dll" for dll as #conv

[run]
'1 window to bmp
dest$ ="R:\window.bmp"
hP =0' sowill grab whole screen
calldll #conv, "formtobmp", hP as ulong, dest$ as ptr, r as long

source$ ="R:\window.bmp": dest$ ="R:\window.jpg"
calldll #conv, "tojpeg", source$ as ptr, dest$ as ptr, r as long

kill "R:\window.bmp" 'remove the bmp version

calldll #kernel32, "Sleep", 10000 as ulong, r as void
' ie 10000 ms or 10 sec- change as you wish.
scan
goto [run]

[quit.main]
close #main
close #conv
end




mikeukmid
Guest

Guest Avatar

Post by mikeukmid on Dec 19, 2008 11:01:34 GMT -5

marcioc Avatar
I developed an application in RB to remotely monitor my pet while I am working. I turn my camera on displaying the images on the screen and SNAGIT captures screens every 5 seconds and records these images in a specific directory.


There is a freeware app called 'Yawcam' which can be configured to periodically capture a webcam image and save to a ramdisk as a .jpg image. I have used it, it works well, although I now use an app I wrote in LibertyBASIC to capture webcam images.

For Yawcam see www.yawcam.com/

Mike.