uncommon Posted May 15, 2012 Posted May 15, 2012 I am attempting to capture a webpage via screenshot, however the script seems to end right when it gets to the _main() function. I'm sure my code is laughable because coding is not my thing but I need to have this done. I need something that will take a screenshot of a specific webpage after the page finishes loading. I have all the code down except for capturing part. Please help.This is what I have so far, some of it was taken from the help file, but obvious I don’t understand enough about functions. _Main()#include <screencapture.au3>Func _Main()Local $hGUI$hGUI = WinGetHandle("UnitedHealthcare Online - Windows Internet Explorer", "")_ScreenCapture_CaptureWnd("C:\Users\Owner\Pictures\Temp\" & $i & ".png", $hGUI)EndFunc</screencapture.au3> No problem can withstand the assault of sustained thinking.Voltaire _Array2HTMLTable(), _IEClassNameGetCollection(), _IEquerySelectorAll()
Danyfirex Posted May 15, 2012 Posted May 15, 2012 here there is a example: maybe is that you want #include <ScreenCapture.au3> Global $handle = WinGetHandle("[CLASS:IEFrame]", "") WinActivate("[CLASS:IEFrame]", "") If @error Then MsgBox(4096, "Error", "Could not find the correct window") Else ; _ScreenCapture_CaptureWnd(@MyDocumentsDir & "GDIPlus_Image.jpg",$handle) msgbox(0,"",$handle) EndIf Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut
uncommon Posted May 15, 2012 Author Posted May 15, 2012 Yes, that seems to work for the most part. I can do the rest. Not sure what the message box is about. Thanks Danyfirex, you just saved me a few nights of headaches. No problem can withstand the assault of sustained thinking.Voltaire _Array2HTMLTable(), _IEClassNameGetCollection(), _IEquerySelectorAll()
Danyfirex Posted May 15, 2012 Posted May 15, 2012 (edited) msgbox(0,"",$handle) only show the handle. delete it if you want.You're welcome. Edited May 15, 2012 by Danyfirex Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut
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