Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 22:25

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Release] Black Box Screen Capture

Discussion on [Release] Black Box Screen Capture within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: May 2011
Posts: 21
Received Thanks: 1
[Release] Black Box Screen Capture

This is me just before dying in Ark Survival Evolved:



And this is me after I found my dead body to get my stuff back quickly:



I found my stuff really quickly and effortlessly, because I had this application running with the game Ark Survival Evolved.

Hate to die and lose your gear? Want it back but find it hard to figure out where you died and left it? This is the app for you.

This app will save compressed pictures to a directory created in the same location that you have the script running from. For an example, see the picture below.



From there you can easily scroll through and find the saved picture of your death, and the pictures leading up to that death. Thus you can easily figure out how to get back and save your stuff. Easy right?

The pictures save every 1.5 seconds, although you could edit that frequency to whatever you want. The source code is available to you below. A typical picture saves as a size of about 70 KB give or take, as a compressed *.JPG.

*Important to know* To exit the application, you need to move your mouse over the [EXIT] text and then mouse click the left and right buttons to close it. The [EXIT] button is typically located up the top left corner of your main monitor. That's easy right?

You will need autoit to use this script:

Code:
#include <Date.au3>
$time = @Year & "y." & @Mon & "m." & @Mday & "d." & @Hour & "." & @Min & "." & @Sec
if(DirGetSize ( @ScriptDir & "\bb_" & $time & "\" ) <> -1) Then ;check to see if the directory already exists
	Beep(200,100)
	Exit
EndIf
If(DirCreate ( @ScriptDir & "\bb_" & $time & "\" ) = 0) Then ;create the directory and then check to see if it exists
	Beep(700,100)
	Exit
EndIf

#include <Misc.au3>
#include <AutoItConstants.au3>
#include <ScreenCapture.au3>

Local Const $iW = @DesktopWidth, $iH = @DesktopHeight

$dll = DllOpen("user32.dll")
Opt("TrayIconHide", 1)

$cnt = 0
$cnt2 = 0
$esc = 0
Dim $alcon[5]
Do ;loop
	$mouse = MouseGetPos()
	If($mouse[0] < 38) and ($mouse[1] < 20) and _IsPressed("01", $dll) and _IsPressed("02", $dll) Then ;exit
		DllClose($dll)
		Exit
	EndIf
	ToolTip("[EXIT] Screen Capture! [" & $cnt2 & "] " & @Hour & ":" & @Min & ":" & @Sec, 0, 0)
	Sleep(250)
	$cnt = $cnt + 1
	If($cnt = 6) Then
		$cnt = 0
		$cnt2 = $cnt2 + 1
		_GDIPlus_Startup()
		Local $hHBmp = _ScreenCapture_Capture("", 0, 0, $iW, $iH) ;create a GDI bitmap by capturing full screen of the desktop
		Local $hBitmap = _GDIPlus_BitmapCreateFromHBITMAP($hHBmp) ;convert GDI bitmap to GDI+ bitmap
		_WinAPI_DeleteObject($hHBmp) ;release GDI bitmap resource because not needed anymore

		Local $hBitmap_Scaled = _GDIPlus_ImageResize($hBitmap, $iW / 2, $iH / 2) ;resize image
		
		_GDIPlus_ImageSaveToFile($hBitmap_Scaled, @ScriptDir & "\bb_" & $time & "\" & $cnt2 & "_" & @Hour & "." & @Min & "." & @Sec & ".jpg")
		_GDIPlus_Shutdown()
	EndIf
Until $esc = 1
Tenshi07 is offline  
Old 08/02/2016, 12:39   #2
 
elite*gold: 0
Join Date: May 2011
Posts: 21
Received Thanks: 1
Updated the script.
Tenshi07 is offline  
Old 08/02/2016, 14:58   #3
dotCom
 
Devsome's Avatar
 
elite*gold: 9842
The Black Market: 107/0/0
Join Date: Mar 2009
Posts: 16,835
Received Thanks: 4,668
Title changed from "Black Box Screen Capture" to "[Release] Black Box Screen Capture" as requested.
Devsome is offline  
Thanks
1 User
Old 08/02/2016, 18:02   #4
 
elite*gold: 0
Join Date: May 2011
Posts: 21
Received Thanks: 1
Thanks a bunch.
Tenshi07 is offline  
Reply


Similar Threads Similar Threads
Screen Capture VB.NET
07/30/2016 - .NET Languages - 9 Replies
Hallo, ich habe vor einen BOT zu schreiben. Dieser soll in minimierter Form funktionieren. Das bedeutet das Spiel ist minimiert und ich kann den PC für andere Sachen verwenden wärend der BOT im hintergrund läuft. Ich möchte auf optische ereignisse reagieren. Hierzu benötige ich allerdeings einen Stream von dem Spiel. Bedeutet, ich möchte einen screenshot von dem Spiel wärend es minimiert ist. Eine möglichkeit wäre die einbindung des Prozesses als Kindprozess(in einer art sandbox mode). Jedoch...
Screen Capture
02/12/2013 - Coding Releases - 5 Replies
.
Screen Capture oder so
03/23/2008 - Technical Support - 0 Replies
Hat jemand von euch ein Programm das alle 10 Sekunden oder mehr oder weniger ein Screen macht und in einen Eingestellten Ordner speichert? Wäre nett wenn ich einen Link bekommen könnte ;) gegoogelt hab ich schon ps : Ich will kein Video :p



All times are GMT +1. The time now is 22:27.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.