jeffblack Posted August 22, 2016 Share Posted August 22, 2016 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 More sharing options...
spudw2k Posted August 23, 2016 Share Posted August 23, 2016 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)) Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
mikell Posted August 24, 2016 Share Posted August 24, 2016 This works for Firefox but could be adapted for any browser Opt("WinTitleMatchMode", -2) $hWnd = WinActivate("firefox") ControlSend($hWnd, "", "", "^{F6}^c") Msgbox(0,"", ClipGet()) Link to comment Share on other sites More sharing options...
MilesAhead Posted August 24, 2016 Share Posted August 24, 2016 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. My Freeware Page Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now