Timed screenshot in Chrome

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Mikey14778
Posts: 2
Joined: 17 Jan 2018, 05:51

Timed screenshot in Chrome

17 Jan 2018, 06:36

Noob question, apologies in advance if it's stupid.

I want to:
1) Call up Chrome once every ten minutes
Chrome will auto-load the relevant web page
2) Screenshot the page - ie, Alt-PrintScreen or similar
3) paste the result into a file and save it to a particular location
4) Close Chrome again

If it helps, I can get an extension for Chrome that will do (2) & (3) in response to a particular keystroke

Is it possible to use AH to do this on a ten minute schedule?

Thanks
Mike
User avatar
Blackholyman
Posts: 1293
Joined: 29 Sep 2013, 22:57
Location: Denmark
Contact:

Re: Timed screenshot in Chrome

17 Jan 2018, 06:50

yeah sure.

on a side note: if you tell us more about what you are using this for or your end goal, we may be able do help with better or simpler ways of doing the same thing!
Also check out:
Courses on AutoHotkey

My Autohotkey Blog
:dance:
BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: Timed screenshot in Chrome

17 Jan 2018, 06:52

Code: Select all

#Persistent
SetTimer, Monitoring,% 1000 * 60 * 10   ; check every ten minutes
Return

Monitoring:
   FormatTime, Date,, yyyy-MM-dd_hh:mm
   UrlDownloadToFile, http://www.nytimes.com, % "NYT_" . Date . ".html"
   Return
Not tested. No screenshots (you wanna save the full page without scrolling?). It archives the pages source code within a standard HTML file. If reviewed not that far after it has been captured it should reload its full content without any problem. If you want to create an archive of screenshots to be used with pattern matching for a game :arrow: gdip.ahk
Mikey14778
Posts: 2
Joined: 17 Jan 2018, 05:51

Re: Timed screenshot in Chrome

17 Jan 2018, 15:26

Thanks guys. The task here is that we have a very complicated web page that we want to display on a screen on the wall. We don't want to dedicate an entire PC to driving it, that's massive overkill. So we put in a Raspberry Pi and pointed it at the web page, but the page is too complex and the internet link too slow, and it has been hideously unreliable. So the plan is to have one of our off-site servers call up Chrome and take a snapshot of the web page every 10 mins or so, save it as an image, and just have the R-Pi load a simple page which is an HTML header which embeds the graphic image of the original page. I'm not sure how big the graphic will be, but nowhere near as big or complex as the megabytes of the original. Creation of the HTML is a doddle, but the timed automation of the screen grab is looking like the tricky bit.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: drani, Freddie, gongnl, haomingchen1998, mmflume, ShatterCoder and 95 guests