MatrixCreations Posted September 9, 2009 Share Posted September 9, 2009 Hello everyone! So I've got a little problem here that I can't seem to be able to resolve. I've already searched the forums, and tried Google for any help, but no luck. I'm quite new to AutoIt, although I love it's fairly ease-of-use language. I actually just started a few days ago and have decided to make a program from it with multiple features for a game. One of the features I am trying to add is a screenshot feature to take high quality pictures in-game and automatically save them within a folder. This is where my problem begins, although my script is successful in creating the folder, and saving multiple screen captures, the scree captures turn out blank and I can't understand why. Maybe it's some thing quite simple, maybe not. If anyone could point me in the right direction, or help me resolve this, I'd very much appreciate it. Here's part of the code: HotKeySet("{INSERT}", "pScreenshot") Func pScreenshot() Local $hBmp DirCreate(@DesktopDir & "\TestCaptures\") $hBmp = _ScreenCapture_Capture("") _ScreenCapture_SaveImage(@DesktopDir & "\TestCaptures\RFscreenie_" & @HOUR & "_" & @MIN & "_" & @SEC & ".png", $hBmp) EndFunc ;==>pScreenshot This is the part of the script that takes the screenshot. As you can see, by pressing the hotkey "INSERT", the script takes a capture and makes a folder on the desktop with the base name followed by the time the capture was taken at. But as I said, the capture comes out as all black and there is nothing on it otherwise. It does takes captures perfectly when I'm just doing it on the desktop, but if I take it within the game, it fails to have anything on it. Thanks in advanced. Link to comment Share on other sites More sharing options...
MatrixCreations Posted September 9, 2009 Author Share Posted September 9, 2009 -BUMP- Any help? I still haven't figured it out... Link to comment Share on other sites More sharing options...
Rambo Posted September 10, 2009 Share Posted September 10, 2009 Can you make a screenshot of a movie? Link to comment Share on other sites More sharing options...
andygo Posted September 10, 2009 Share Posted September 10, 2009 i think its because of DirectX Video Acceleration setting.... Link to comment Share on other sites More sharing options...
MatrixCreations Posted September 11, 2009 Author Share Posted September 11, 2009 Thanks for the replies. I can take screen shots of movies playing in WMP, but still can't take screen captures in the game, of anything. Link to comment Share on other sites More sharing options...
LeeTheMex Posted November 22, 2010 Share Posted November 22, 2010 For games, you must use the _ScreenCapture_CaptureWnd function instead. I'm still having issues with screenshots of games in fullscreen mode where images is black on certain layers sometimes. In windowed mode, this works great. Try this for your case: HotKeySet("{INSERT}", "pScreenshot") Func pScreenshot() Local $folder = @DesktopDir & "\TestCaptures" DirCreate($folder) _ScreenCapture_CaptureWnd($folder & "\RFscreenie_" & @HOUR & "_" & @MIN & "_" & @SEC & ".png", WinGetHandle("[ACTIVE]")) EndFunc ;==>pScreenshot Link to comment Share on other sites More sharing options...
Tvern Posted November 22, 2010 Share Posted November 22, 2010 Pretty sure it's dead. 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