Jump to content
kjcdude

Screen Capture a PrtScn

Recommended Posts

kjcdude

I need to be able to save the print screen that was taken by someone pressing the print screen button.

I need to get the screen without having a script running during the time the print screen was generated. I need to be able to retrieve it after it's captured by windows.

Thanks.

Edited by kjcdude

Share this post


Link to post
Share on other sites
Inverted

You mean take it from the clipboard ?

Share this post


Link to post
Share on other sites
wolf9228

I need to be able to save the print screen that was taken by someone pressing the print screen button.

I need to get the screen without having a script running during the time the print screen was generated. I need to be able to retrieve it after it's captured by windows.

Thanks.

#include <ScreenCapture.au3>
#Include <Clipboard.au3>
Send("{PRINTSCREEN}")
$hBmp = _ClipBoard_GetData($CF_BITMAP)
_ScreenCapture_SaveImage (@ScriptDir & "\ClipBoard_GetData.jpg", $hBmp)
Edited by wolf9228

صرح السماء كان هنا

 

Share this post


Link to post
Share on other sites
martin

#include <ScreenCapture.au3>
#Include <Clipboard.au3>
Send("{PRINTSCREEN}")
$hBmp = _ClipBoard_GetData($CF_BITMAP)
_ScreenCapture_SaveImage (@ScriptDir & "\ClipBoard_GetData.jpg", $hBmp)
Presumably you mean

#include <ScreenCapture.au3>
#Include <Clipboard.au3>
;Send("{PRINTSCREEN}")
$hBmp = _ClipBoard_GetData($CF_BITMAP)
_ScreenCapture_SaveImage (@ScriptDir & "\ClipBoard_GetData.jpg", $hBmp)

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites
kjcdude

Exactly what i needed.

thanks

Share this post


Link to post
Share on other sites
AutoMathic

Hi, it doesn't work. I copied & pasted and added this line:
 

#include <ScreenCapture.au3>
#Include <Clipboard.au3> ;
Send("{PRINTSCREEN}")
$hBmp = _ClipBoard_GetData($CF_BITMAP)
if $hBmp = 0 then MsgBox (0, "$hBmp", $hBmp) ; this shows the hBmp is zero
_ScreenCapture_SaveImage (@ScriptDir & "\ClipBoard_GetData.jpg", $hBmp)

And the function _ClipBoard_GetData returns 0 and saves nothing to the file.

Also I tried to add delay after Send command or remove the Send command all together.

The _ClipBoard_Open does _not_ help either.

Edited by AutoMathic

Share this post


Link to post
Share on other sites
careca

Considering

$CF_BITMAP = Handle to a bitmap (HBITMAP)

And there's no handle set previous to this, it's suposed to fail, imo.

Or maybe im looking at it wrong.

That being said, im not sure how we can make it work.

Edited by careca

Spoiler

Paster - Main function is to paste text, but has more functions. (No longer mantained, switched to String Trigger)

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Firefox Profile Backup - Backup/restore previously saved profile.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Share this post


Link to post
Share on other sites
careca

Not for me, handle is all zeroes


Spoiler

Paster - Main function is to paste text, but has more functions. (No longer mantained, switched to String Trigger)

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Firefox Profile Backup - Backup/restore previously saved profile.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×