Onyn

Take screenshot from scrollable control

2 posts in this topic

Hello.

I have email message in outlook. And i need to take screenshot of the entire message. But content does not fit on the screen and scrolling occurs. I can not figure out how to make a screenshot with scrolling.

MouseWheel() is not a choise. Because it is hard to find out border for subsequent gluing screenshots together.

Is it possible to scroll down the content for a certain number of pixels?

I work with outlook through the COM. Here goes code:

$msg_width = 800
$msg_height = 900

$o = ObjCreate("Outlook.Application")
$folder = $o.GetNamespace("MAPI").Folders.Item(2).Folders.Item(1) ; navigate to specific folder

$email = $folder.Items(2) ; take email message from store
$item.Display() ; show message in window

$message_window = WinGetHandle("[CLASS:rctrl_renwnd32]", "Сообщение")
WinMove($message_window, "", 0, 0, $msg_width, $msg_height)
$control = ControlGetHandle($win_list[$i][1], "", "[CLASS:Internet Explorer_Server]")

; ???

$item.Close(1)

Screenshot: '>

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