This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
ardera's profile picture

Screen Capture V. 0.2 (now with Player and Remote Computer Control)

Started by ardera, 14 August 2012 - 05:23 PM
ardera #1
Posted 14 August 2012 - 07:23 PM
Screen Capture V. 0.2 (+ Player, Remote Computer Control)

UPDATE:
Remote Computer Control:
Now released
+ can control Computers


Hey Guys,
This is my new Program:
Screen Capture V. 0.2

EXPLANATION
It simply allows you to capture the screen without some extra Windows Programs (like "Fraps")
It replaces the term functions and simulates an extra screen in a table.



INSTRUCTIONS
–For Capturing–
1. Download ScreenCapture and put it in your Computer where you want to capture the screen
2. Start ScreenCapture
3. Type the Time between the screenshots
4. Type the Key Number (it detects the key number of the key you pressed) wich stops the
capture (I can recommend Del, you don't use it often but its on every keyboard!)
5. Type the name of the folder (the folders will be saved in "captures/") where the images are going to save

–For Playing a captured vid–
1. Download The official PrintCapture Player
2 Copy the PrintCapture Player to your Computer where you want to play a captured video, (4.1 contines)
3 Run the PrintCapture Player
4 Type the folder where the images are in without an / at the end
5 Type a key which can interrupt the player
6 Type a key wich can pause the player
7 press "+"/"-" to increase/decrease the framerate

–For Remote Computer Control–
1. Download the official Remote Computer Control Program in the Download section
2. Copy or move the downloaded program to the computer you wish to control, and the computer you wish to control this computer
3. Start the downloaded program in the computer you wish to control (host) the other computer
4. Type "host" (not case-sensitive) and press enter
5. Type the id of the computer you wish to control and press enter
6. Type a key wich can terminate the session and press enter
7. Now set up the pc wich should be controled
8. start the downloaded program in the computer you wish to control
9. Type "client" (not case-sensitive) and press enter
10. Type the id of the controler Computer and press enter
11. Type a key wich can terminate the session and press enter
12. Type the frame rate (time to sleep between the frames) and press enter
13. Now you can control the PC!!!

BUGS
*Capture a part of secret/alongtimeago and view it… then you see what i mean…

TODO
-Saving in png or other file format
-Saving as a VIDEO!
-Better capturing
-Better viewing
-Finishing Video Suite with BigShinyToys
(-learn english)

DOWNLOAD
Capture: >klick here<
Player: >klick here<
Remote: >klick here<

OTHER PROGRAMS
OS will be released soon, see: ardera.funpic.de
BigSHinyToys #2
Posted 14 August 2012 - 07:55 PM
for some reason when i try it with this it explodes??
Spoiler

function safeWrite(this)
local termX,termY = term.getSize()
local curX,curY = term.getCursorPos()
if termX-curX-1 < 0 then
  return
else
  write (string.sub(this,1,termX-curX-1))
  return
end
end
local function draw(tCard,offX,offY)
for i = 1,#tCard do
  term.setCursorPos(offX,offY+i-1)
  safeWrite(tCard[i])
end
end
term.clear()
term.setCursorPos(1,1)
local ace = {[[.------.]],
[[|A.--. |]],
[[| :/: |]],
[[| (__) |]],
[[| '--'A|]],
[[`------']]}
local winX,winY = term.getSize()
local curX,curY = 1,1
draw(ace,curX,curY)
--[[
while true do
local e,e1 = os.pullEvent()
if e == "key" then
  if e1 == 200 then -- up
   curY = curY - 1
  elseif e1 == 208 then -- down
   curY = curY + 1
  elseif e1 == 203 then -- left
   curX = curX - 1
  elseif e1 == 205 then -- right
   curX = curX + 1
  elseif e1 == 28 then -- enter
   break
  end
  if curX > winX-8 then curX = 1 end
  if curX < 1 then curX = winX-8 end
  if curY > winY-6 then curY = 1 end
  if curY < 1 then curY = winY-6 end
end
term.clear()
local text = "Pos : X "..curX.." Y "..curY
term.setCursorPos(winX-string.len(text)-1,winY)
write(text)
draw(ace,curX,curY)
end
]]--
local gravityAcceloration = 9.80665 -- meters per second 9.80665 m/s2 (approx. 32.174 ft/s2)
local friction = 3
local speedX,speedY = 3,-9
local cardX,cardY = 1,1
local updateRate = 0.1
local test
-- + (gravityAcceloration/updateRate)
local function applyPh()
speedY = speedY + (gravityAcceloration*updateRate)
test = (speedY*updateRate)
cardY = cardY + test
cardX = cardX + (speedX*updateRate)
local y = cardY
if math.floor(y) > winY-6 then
  speedY = 0-(speedY-friction)
  cardY = winY-6
end
end
local count = 0
os.startTimer(updateRate)
while true do
local e,e1 = os.pullEvent()
count = count+1
if count > 170 then
  break
end
term.clear()
if e == "timer" then
os.startTimer(updateRate)
elseif e == "key" and e1 == 28 then
  break
end
applyPh()
draw(ace,math.floor(cardX),math.floor(cardY))
--local text2 = "Card : X "..cardX.." Y "..cardY.." sX "..speedX.." sY "..speedY.."T"..test
--local text2 = test
local text2 = "Fram:"..tostring(count)
term.setCursorPos(winX-string.len(text2)-1,winY)
write(text2)
end
term.clear()
term.setCursorPos(1,1)
settings
capture rate 0.1
capture key 200 – up
capture name random

[EDIT]
this program i made might complement your capture system Give it a try you might like
ASCII art -- Paint for Computer Craft
Cranium #3
Posted 14 August 2012 - 08:05 PM
Lol, I just stumbled upon your program on pastebin before you posted it here. Small world….
BigSHinyToys #4
Posted 14 August 2012 - 08:09 PM
Lol, I just stumbled upon your program on pastebin before you posted it here. Small world….
got board added physics meh…
ardera #5
Posted 14 August 2012 - 08:19 PM
for some reason when i try it with this it explodes??

It seems that I can add a new bug o.O

Im already working on the next version:
Play a Capture using a prog and only a very little update to the capturing program

I think the bug you said will fixed in the version after the next version

PS.: What does it print if it "explodes"? errors, messages… ?
BigSHinyToys #6
Posted 14 August 2012 - 08:40 PM
for some reason when i try it with this it explodes??

It seems that I can add a new bug o.O

Im already working on the next version:
Play a Capture using a prog and only a very little update to the capturing program

I think the bug you said will fixed in the version after the next version

PS.: What does it print if it "explodes"? errors, messages… ?
Made a player
Spoiler

local tArgs = {...}
local cycle = 0
local function play(file,pause)
while true do
  cycle = cycle +1
  local fileNale = file..[[/Image]]..cycle
  print(fileNale)
  if fs.exists(fileNale) then
   local file = fs.open(fileNale,"r")
   local fram = file.readAll()
   file.close()
   term.clear()
   term.setCursorPos(1,1)
   write(fram)
   sleep(pause)
  else
   break
  end
end
end
if fs.exists(tArgs[1]) then
if fs.isDir(tArgs[1]) then
  play(tArgs[1],tonumber(tArgs[2]))
end
end
Basic but effective

Explodes is just my way of adding some texture to my communications. "there is a bug in you code yada yada" it gets old fast.
The error is parallel problem

parallel:22: screencap.lua:72: bad argument: string expected, got nil
ardera #7
Posted 14 August 2012 - 08:43 PM
Hey I worked on a player too!
I will add your player to the Post ok?

To explode: youre right! :P/>/>
My way to add textures is to add smilies…

PS.: I think its going to be fixed in the next version:
(release in 5 min's :D/>/>)
mad-murdock #8
Posted 14 August 2012 - 10:34 PM
awesome - both for the idea as for the vividness of the cc-forum community. makes me smile. at least some people are not busy writing their own os without features (:
ardera #9
Posted 15 August 2012 - 06:40 AM
:P/>/> thanks

PS.: If anybody knows a way to code image/video files then say me.
BigSHinyToys #10
Posted 15 August 2012 - 07:59 AM
While i dont know how to creat videos or PNG's I think compacting the videos into something like "alongtimeago" might be useful for sharing vids making animators fun again.

If you would like first dibs at creating it i will not start working on it.
Also you don't really have to put my player in the OP I just made it to see what it captured before it crashed.

the bellow program i mentioned earlier is a Frame Editor that allows you to change the picture in different frames.
ASCII art -- Paint for Computer Craft

Combining all our programs / skills would you like to evolve this into a fully fledged ASCII Video editing sweet?
ardera #11
Posted 15 August 2012 - 08:21 AM
While i dont know how to creat videos or PNG's I think compacting the videos into something like "alongtimeago" might be useful for sharing vids making animators fun again.

If you would like first dibs at creating it i will not start working on it.
Also you don't really have to put my player in the OP I just made it to see what it captured before it crashed.
Already done.
the bellow program i mentioned earlier is a Frame Editor that allows you to change the picture in different frames.
ASCII art -- Paint for Computer Craft

Combining all our programs / skills would you like to evolve this into a fully fledged ASCII Video editing sweet?
Yes, why not :P/>/>
Sammich Lord #12
Posted 15 August 2012 - 10:30 AM
Hey I noticed you can't record programs.
I would love to see the ability to record me getting a high score on worm then just upload a zip of the vid.
If it is possible can you add the feature and if the feature is already in the program then you can refer to me as "NOOB".
ardera #13
Posted 15 August 2012 - 11:19 AM
Hey I noticed you can't record programs.
???
Only Programs like "alongtimeago" are buggy (i don't know if I translated it right, if not, say: it lags)
I would love to see the ability to record me getting a high score on worm then just upload a zip of the vid.
If it is possible can you add the feature and if the feature is already in the program then you can refer to me as "NOOB".
you can record programs:
start ScreenCapture,
then type your settings,
and start. The Capture Process runs in the background.
You can start worm and play it if you want.

INFORMATION: We (me and BigSHinyToys) are working on an Video Suite,
where you can cut your Videos, and edit them.
Sammich Lord #14
Posted 15 August 2012 - 12:31 PM
INFORMATION: We (me and BigSHinyToys) are working on an Video Suite,
where you can cut your Videos, and edit them.
What I mean is that I enter my settings and everything but when I type in a program for example: worm it cancels the recording. Is there a certain way for me to use it or what?
If so when will it be done?
Sounds awesome!
And if you are done can I use it in my upcoming OS?
ardera #15
Posted 15 August 2012 - 05:29 PM
INFORMATION: We (me and BigSHinyToys) are working on an Video Suite,
where you can cut your Videos, and edit them.
What I mean is that I enter my settings and everything but when I type in a program for example: worm it cancels the recording. Is there a certain way for me to use it or what?
If so when will it be done?
I think in the next Update…
Sounds awesome!
Thanks!
And if you are done can I use it in my upcoming OS?
Yes, you can
ardera #16
Posted 18 August 2012 - 10:35 AM
Upload of the new version of ScreenCapture soon…
Sammich Lord #17
Posted 18 August 2012 - 03:18 PM
Hey just wanted to let you know that even with V 0.2 there is a still a bug that,
stops the recording when ever the enter key is pressed.
The way I fixed it was that I hard coded it to stop when ever DEL is pressed.
The problem is probably caused by it constantly waiting for enter to be pressed to break the loop.
ardera #18
Posted 18 August 2012 - 07:18 PM
I know I didn't upload the new version yet :(/>/> Im doing this now, and you was right with the bug. the var p1 was the param 1 of the os.pullEvent function, and I used the p1 for the argument of the capture function, so p1 could only be 28… But thats fixed in the new version. PS.: a pause function to the capture will be added soon.

EDIT: uploaded.
EDIT2: How to change the title to 0.2?
BigSHinyToys #19
Posted 18 August 2012 - 09:01 PM
This is how to edit titles
http://www.computercraft.info/forums2/index.php?/topic/3513-how-to-edit-post-titles-like-this/
ardera #20
Posted 19 August 2012 - 09:13 AM
Ah thanks :D/>/>
Jan #21
Posted 19 August 2012 - 04:43 PM
You could make a feature, that sends the screen to computer2 :D/>/>
And then the screen is shown on computer2.
Also computer2 should send it's "key" and "char" events to computer1.
That way you could fully use a computer from distance :P/>/>
ardera #22
Posted 19 August 2012 - 05:00 PM
You mean remote control?
Good suggestion! Edit: *finished coding*

Im making a new program for this…

And then you can control a computer that controls its control computer! :D/>/>
ardera #23
Posted 20 August 2012 - 09:39 AM
Update: Now finished the remote control program for computers, thanks for the suggestion from Jan!
Jan #24
Posted 20 August 2012 - 10:58 AM
Update: Now finished the remote control program for computers, thanks for the suggestion from Jan!
Well done, the client and host work perfectly :D/>/>

The future of CCcomputers will be kinda like Sun Ray clients IRL:
The Sun Ray is a very little computer that sends the user input (keys, mousemovement) over LAN to a giant network computer with a Virtual Machine that runs Windows XP. And then the network computer sends the screen of Windows XP to the Sun Ray.

Since your screen capture software is made, there are great possibilities for people who want to work on virtual OS'es for CC.

BTW, Is it okay that I modify the Remote software to allow sending of the cursorpos, and auto-startup?
ardera #25
Posted 20 August 2012 - 11:57 AM
Update: Now finished the remote control program for computers, thanks for the suggestion from Jan!
Well done, the client and host work perfectly :D/>/>

The future of CCcomputers will be kinda like Sun Ray clients IRL:
The Sun Ray is a very little computer that sends the user input (keys, mousemovement) over LAN to a giant network computer with a Virtual Machine that runs Windows XP. And then the network computer sends the screen of Windows XP to the Sun Ray.

Since your screen capture software is made, there are great possibilities for people who want to work on virtual OS'es for CC.
I think very very much people work on virtual OS'es… :P/>/>
But it has 1 advantage: you can save very much Programs and Files in the server.

Hey I can make a very small virtual OS!
But I have to make the Capture better for that…
BTW, Is it okay that I modify the Remote software to allow sending of the cursorpos, and auto-startup?
Yes you can.
I worked on the cursor Pos to, but it only made the program buggy and laggy…
Jan #26
Posted 24 August 2012 - 11:36 AM
– SNAP –
Hey Ardera, I started the Windows project using your part of your code:

Windows (sneak peek) - Run 2 progs at the same time! Works with any prog!

Thanks again, without your code it wasnt possible to remember the screen for each window.
ardera #27
Posted 25 August 2012 - 07:45 AM
No Problem ^^

EDIT: Looked at your Project now, Well Done! *Testing*
Is it right that the windows is renamed if you type something and press enter?
Jan #28
Posted 25 August 2012 - 12:26 PM
No Problem ^^

EDIT: Looked at your Project now, Well Done! *Testing*
Is it right that the windows is renamed if you type something and press enter?
Yes that is normal. It used a slightly modified CraftOS shell. One modification is that it hooks into shell.run and reports the program.
ardera #29
Posted 25 August 2012 - 01:17 PM
Ah, ok! But youre Program is really good… Like Windows ^^
Jan #30
Posted 25 August 2012 - 02:55 PM
Ah, ok! But youre Program is really good… Like Windows ^^
Thanks :D/>/> If you want to help or have suggestions, you're welcome.
ardera #31
Posted 31 October 2012 - 09:48 AM
Only added a small poll