Sign in to follow this  
Followers 0
theyranos

Capture tooltips along with the rest of the screen

4 posts in this topic

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

Share this post


Link to post
Share on other sites



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

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")

Sleep(4000) gives me 4 seconds to get the tool tip showing before the screen shot is taken.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

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
Sign in to follow this  
Followers 0