SourceGrab - Class to get the source code of the active browser window

Post your working scripts, libraries and tools for AHK v1.1 and older
User avatar
evilC
Posts: 4823
Joined: 27 Feb 2014, 12:30

SourceGrab - Class to get the source code of the active browser window

13 Aug 2015, 14:10

This is a class to enable you to easily pull information from the source code of the active browser window.

Features:
  • Works by sending keystrokes (Ctrl-U, Ctrl-A, Ctrl-C) and will close the view source window once it has copied the source.
  • Currently works with Firefox, Chrome and IE
  • Example included which pulls the HTML DocType from the source of the active window when you hit F12, and types the DocType when you hit F11
  • Shows a confirmation dialog to let you know if it successfully grabbed the source.
  • Restores the state of the clipboard after use
https://github.com/evilC/SourceGrab/
Last edited by evilC on 14 Aug 2015, 06:41, edited 2 times in total.
User avatar
boiler
Posts: 16902
Joined: 21 Dec 2014, 02:44

Re: SourceGrab - Class to get the source code of the active browser window

14 Aug 2015, 00:03

Thanks for sharing this. It will be very helpful in a task I have which requires me to grab some info from the source code of dozens of pages.
Guest10
Posts: 578
Joined: 01 Oct 2013, 02:50

Re: SourceGrab - Class to get the source code of the active browser window

14 Aug 2015, 06:16

Nice work. In Features: Works by sending keystrokes (Ctrl-U, Ctrl-A, Ctrl, C) ... >> (Ctrl-U, Ctrl-A, Ctrl-C) :ugeek:

Return to “Scripts and Functions (v1)”

Who is online

Users browsing this forum: No registered users and 57 guests