Answer the question
In order to leave comments, you need to log in
How to program automatic screenshot creation in FF, Chrome and Opera
You need to write a program with one button. Open a browser (any), open some page in it, click on the button in the program. The output is a file with a screenshot of a long web page.
A la, how it is implemented in FastStone Capture.
To implement this, you need to determine the current position of the visible area relative to the page and automatically scroll the window. It turned out to write an implementation for IE. But with FF, Chome and Opera - difficulties.
How can I determine the full size of the scrollbox window? I'm trying to do it through GetScrollInfo. For some windows, the function returns normal values (notepad, explorer), for others it returns zeros. Ideally, I need to get the size of the web page loaded in the browser by passing the browser window handle to the function.
Or suggest another implementation.
Thanks in advance.
Answer the question
In order to leave comments, you need to log in
Not all yogurt programs are equally useful written. And therefore, not everyone uses WinAPI to create UI objects in their window, and therefore GetScrollInfo will not work everywhere - the conclusion is that if the program does not have some kind of API for obtaining information and it does not use the generally accepted API that could provide it, it will be extremely difficult.
Are you sure that GetScrollInfo is taken from the desired inner window? In theory, in any case, if the scroll component is standard, then it can be obtained, but maybe the reason is in the wrong "bulkhead" of the window components?
As an alternative - "tear out" the address from the browser, load it inside the program and "screen" it already inside. But here is an ambush - the page will not look the same as in the target browser.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question