Jump to content

Find Source of active window


Recommended Posts

Hi

I'm trying to find a way to get the source code from the active web browser window I know I can get it using 

ConsoleWrite(_INetGetSource('http://www.autoitscript.com'))

but I don't want to have to enter a url. just want to open the window and press my hotkey

Is this possible if so would someone please point me in the right direction

Link to comment
Share on other sites

Which browser are you using?  Here's a primitive/quick example that works on my machine with IE11 (tested with only 1 window open)

#include <Inet.au3>
$sURL = ControlGetText("[CLASS:IEFrame]","","Edit1")
If Not $sURL Then Exit
ConsoleWrite(_INetGetSource($sURL))

 

Link to comment
Share on other sites

I have a freeware written in AutoIt3 designed to make it a bit easier to snap up source code from selected text on a browser page.  I call it SourceSnap

 

Mainly the idea is to save source to a filename, or for small selections, add the selection to a snp file.  It is very simple.  Just meant to make things a bit easier than free handing it. :)

Like all freeware on my page it is free for you to use at your own risk.  Don't get paranoid if VirusTotal shows a few red flags.  I regularly download everything on my page using DownLoadThemAll and compare the md5 sums with the zip files I have stored locally.

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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