Capture full webpage as png with inbuild chrome dev tools

Talk about anything
User avatar
noname
Posts: 507
Joined: 19 Nov 2013, 09:15

Capture full webpage as png with inbuild chrome dev tools

19 Jan 2018, 06:59

Image

Maybe this is common knowledge......but i did not know you could use "chrome development tools" to capture a whole webpage as png .
Unfortunately i do not see a method to link it to a shortcut.
User avatar
noname
Posts: 507
Joined: 19 Nov 2013, 09:15

Re: Capture full webpage as png with inbuild chrome dev tools

21 Jan 2018, 03:24

Thank you for the link ,what a coincidence posted on 16 jan :) Unfortunately i see the limitation it has to have chrome running in debug mode but the access to dev tools from within ahk is something to play with !

This is offtopic Blackholyman but if you have time to take a look at https://autohotkey.com/boards/viewtopic.php?f=5&t=42753 ? The solution of "Guest" works but is there no way of avoiding the namespace problem without "setting" one and have to use it in the following queries ?Thanks :)
Guest

Re: Capture full webpage as png with inbuild chrome dev tools

21 Jan 2018, 06:03

You can do the same and more with http://phantomjs.org/
PhantomJS is a headless WebKit scriptable with a JavaScript API. It has fast and native support for various web standards: DOM handling, CSS selector, JSON, Canvas, and SVG.
Screencapture example http://phantomjs.org/screen-capture.html
User avatar
Xtra
Posts: 1269
Joined: 02 Oct 2015, 12:15

Re: Capture full webpage as png with inbuild chrome dev tools

21 Jan 2018, 06:30

Code: Select all

#NoEnv
SetKeyDelay, 50, 50

#IfWinActive, ahk_class Chrome_WidgetWin_1
$1::
    Send, {Ctrl Down}{Shift Down}i{Shift Up}{Ctrl Up}
    Sleep 100
    Send, {Ctrl Down}{Shift Down}p{Shift Up}{Ctrl Up}
    Sleep 500
    SendInput, screenshot
    Sleep 250
    Send, {Enter}
    Sleep 2000    ; Sleep longer to allow time for image to be created before closing dev tools
    Send, {Ctrl Down}{Shift Down}i{Shift Up}{Ctrl Up}
return
#If
User avatar
noname
Posts: 507
Joined: 19 Nov 2013, 09:15

Re: Capture full webpage as png with inbuild chrome dev tools

21 Jan 2018, 14:49

Hi BoBo ,
You traveled to the outer regions of the internet again :)

Guest,
I will have to spend a few weekends with phantomjs i guess.....there is indeed a lot more in it.

Xtra ,
I am not fond of sending keystrokes but your code works very well ,i only had to increase the sleep values but it proved to be very easy in use.

Return to “Offtopic”

Who is online

Users browsing this forum: No registered users and 11 guests