Jump to content

Recommended Posts

Posted

As part of my screen-capture app, a "scrolling capture" feature, in which the entire client contents (on-screen and off-screen) of the window get captured, is the last big obstacle.

From what I can determine, I have to choose between the MouseWheel() or the Send("{PGDN}") commands to move down the window. But when should the script stop repeating these commands, i.e., how can one detect that the bottom of the window content has been reached (and one can scroll no further)?

I'm going 'cold turkey' on the kludgy techniques, like observing the scrollbar behavior and things like that. (Besides, not all windows have scrollbars).

It appears that AutoIt offers no means of managing "page" coordinates / dimensions but only the dimensions for "window" and "screen" coordinates (the visible parts).

Is there any command or method more appropriate for me to use?

Posted

  Quote

I'm going 'cold turkey' on the kludgy techniques, like observing the scrollbar behavior and things like that. (Besides, not all windows have scrollbars).

How do you scroll a window without scrollbars?

Posted
  RealisT said:

As part of my screen-capture app, a "scrolling capture" feature, in which the entire client contents (on-screen and off-screen) of the window get captured, is the last big obstacle.

I would like to know what screen capture application you are using. If it is capturing "off screen" data in a scrollable window then that's not a screen capture anymore, is it? :) Since I can't figure out what you're actually trying to do with this program it is hard to help. With autoit you can completely control any key on the key board including the "Home" and "End" key if all you want to do is go to the begining or end of the scrollable page. Could you could please provide more details on your scripting goals along with the application you are using.
  • 2 weeks later...
Posted

  simusphere said:

I would like to know what screen capture application you are using. If it is capturing "off screen" data in a scrollable window then that's not a screen capture anymore, is it? :) Since I can't figure out what you're actually trying to do with this program it is hard to help. With autoit you can completely control any key on the key board including the "Home" and "End" key if all you want to do is go to the begining or end of the scrollable page. Could you could please provide more details on your scripting goals along with the application you are using.

This is an app which captures all or part of the screen / window. One particular feature is the ability to capture the entire contents of the client area of a window---even the off-screen parts---into a single capture image. Scrolling is required to sweep down the page (i.e., page = entire client contents of window) to get it all.

Managing the scrolling is the elusive part. When would the script know when to stop scrolling? I see no way to ascertain when the bottom of the page is reached other than monitoring the scrollbar itself.

Posted

  weaponx said:

How do you scroll a window without scrollbars?

I can't, and I wouldn't. But would the app know if scrollbars are there or not, and when & when not to attempt scrolling? This is such an unclear part of AutoIt.

Posted

What program(s) will you be needing to interact with? The method of interaction depends on what type of controls you are dealing with.

For example, if you are trying to capture a Notepad window you can use something like:

#include <misc.au3>
#Include <GuiEdit.au3>

; Script Start - Add your code below here
Opt("WinTitleMatchMode", 4) 
$winHandle = WinGetHandle ("[CLASS:Notepad]")
$controlHandle = ControlGetHandle ($winHandle, "", "Edit1")


_GUICtrlEdit_Scroll($controlHandle,$SB_LINEDOWN)

Other scrollbars can receive messages using _SendMessage. See here:

http://msdn2.microsoft.com/en-us/library/ms997557.aspx

This page lists all kinds of functions:

GetScrollPos

GetScrollRange

SetScrollPos

SetScrollRange

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...