theyranos Posted November 19, 2008 Share Posted November 19, 2008 I've got a handy script that takes a screenshot and saves it with a predictable name every time I click the mouse. I use it whenever I need to make a tutorial involving a lot of screenshots. The script uses _ScreenCapture_Capture, but I've noticed that some UI elements such as tooltips and some context menus don't appear in the resulting screenshots, and I'd like to change that. I've looked at the source of _ScreenCapture_Capture, but all that's told me is that I'm going to need something involving API calls to make it work (specifically, I'm going to need a handle to a windows API bitmap if I want my screengrabs to work with the rest of the ScreenCapture.au3 functions... Either that or some kind of memory handle that I can defer saving until later). Can anybody point me to somewhere in the Windows API that would result in a more complete screenshot? Or do I need to simulate a printscreen keypress and capture the image from the clipboard? Thanks. -theyranos Link to comment Share on other sites More sharing options...
Malkey Posted November 19, 2008 Share Posted November 19, 2008 I've got a handy script that takes a screenshot and saves it with a predictable name every time I click the mouse. I use it whenever I need to make a tutorial involving a lot of screenshots. The script uses _ScreenCapture_Capture, but I've noticed that some UI elements such as tooltips and some context menus don't appear in the resulting screenshots, and I'd like to change that. I've looked at the source of _ScreenCapture_Capture, but all that's told me is that I'm going to need something involving API calls to make it work (specifically, I'm going to need a handle to a windows API bitmap if I want my screengrabs to work with the rest of the ScreenCapture.au3 functions... Either that or some kind of memory handle that I can defer saving until later). Can anybody point me to somewhere in the Windows API that would result in a more complete screenshot? Or do I need to simulate a printscreen keypress and capture the image from the clipboard? Thanks. -theyranosWhenever a key or mouse button is pressed the tool tip disappears. So I experimented with the Sleep() function. It worked. You could added a sleep() function to your favorite screen capture script. Or, add a different hotkey for a delayed screen capture. #include <ScreenCapture.au3> Sleep(4000) _ScreenCapture_Capture(@DesktopCommonDir & "\GDIPlus_Image1.jpg") ShellExecute(@DesktopCommonDir & "\GDIPlus_Image1.jpg") Sleep(4000) gives me 4 seconds to get the tool tip showing before the screen shot is taken. Link to comment Share on other sites More sharing options...
theyranos Posted November 19, 2008 Author Share Posted November 19, 2008 Whenever a key or mouse button is pressed the tool tip disappears. So I experimented with the Sleep() function. It worked. You could added a sleep() function to your favorite screen capture script. Or, add a different hotkey for a delayed screen capture. #include <ScreenCapture.au3> Sleep(4000) _ScreenCapture_Capture(@DesktopCommonDir & "\GDIPlus_Image1.jpg") ShellExecute(@DesktopCommonDir & "\GDIPlus_Image1.jpg") I run this script, and the tooltip appears (I can see it) before the tray icon changes. The icon change shows up in the screenshot, but the tooltip doesn't. Link to comment Share on other sites More sharing options...
theyranos Posted November 20, 2008 Author Share Posted November 20, 2008 I fixed it using the following extremely hacky solution: Replace this line: local $screen = _ScreenCapture_Capture() Still, it'd be nice if there were a way to do this directly with the windows API rather than with a simulated keystroke. 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