kjcdude Posted February 8, 2009 Share Posted February 8, 2009 (edited) 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 February 8, 2009 by kjcdude Link to comment Share on other sites More sharing options...
Inverted Posted February 8, 2009 Share Posted February 8, 2009 You mean take it from the clipboard ? Link to comment Share on other sites More sharing options...
wolf9228 Posted February 8, 2009 Share Posted February 8, 2009 (edited) 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 February 8, 2009 by wolf9228 صرح السماء كان هنا Link to comment Share on other sites More sharing options...
martin Posted February 8, 2009 Share Posted February 8, 2009 #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. Link to comment Share on other sites More sharing options...
kjcdude Posted February 9, 2009 Author Share Posted February 9, 2009 Exactly what i needed. thanks Link to comment Share on other sites More sharing options...
AutoMathic Posted January 21, 2018 Share Posted January 21, 2018 (edited) 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 January 21, 2018 by AutoMathic Link to comment Share on other sites More sharing options...
careca Posted January 21, 2018 Share Posted January 21, 2018 (edited) 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 January 21, 2018 by careca Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders 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. 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 Link to comment Share on other sites More sharing options...
mikell Posted January 21, 2018 Share Posted January 21, 2018 This works for me #include <ScreenCapture.au3> #Include <Clipboard.au3> Send("{PRINTSCREEN}") _ClipBoard_Open(0) $hBmp = _ClipBoard_GetDataEx($CF_BITMAP) _ClipBoard_Close() MsgBox (0, "$hBmp", $hBmp) _ScreenCapture_SaveImage (@ScriptDir & "\ClipBoard_GetData.jpg", $hBmp) Xandy 1 Link to comment Share on other sites More sharing options...
careca Posted January 21, 2018 Share Posted January 21, 2018 Not for me, handle is all zeroes Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders 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. 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 Link to comment Share on other sites More sharing options...
junkew Posted January 25, 2018 Share Posted January 25, 2018 FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now