charon Posted January 17, 2014 Posted January 17, 2014 I am trying to view the source code from a secure site: Just trying to extract the download link but my code fails #include <Inet.au3> #include <IE.au3> ;~ $test = "https://www.java.com/en/download/manual.jsp" ;~ $string=_INetGetSource($test) ;~ $result = StringInStr($string, "Download Java software for Windows (64-bit)") ;~ MsgBox(0, "", "Results: " & $string) ;~ Local $oIE = _IE_Example("https://www.java.com/en/download/manual.jsp") ;~ Local $sHTML = _IEDocReadHTML($oIE) ;~ MsgBox(0, "Document Source", $sHTML) ;a title="Download Java software for Windows (64-bit)" href="http://javadl.sun.com/webapps/download/AutoDL?BundleId=83385"> $oIE = _IECreate("https://www.java.com/en/download/manual.jsp", 0, 0) $sString = _IEBodyReadHTML($oIE) MsgBox(0, "Document Source", $sString)
michaelslamet Posted January 17, 2014 Posted January 17, 2014 It works for me. The Msgbox display the source when I'm running the code
charon Posted January 17, 2014 Author Posted January 17, 2014 So when I run it under windows 7 I just get autoit icon on the taskbar. When I click it nothing happens. I just tried it in Windows XP and it works. I tried it on a 2nd windows 7 PC and it doesn't work. just not showing me the msgbox window. I can continue without that window
Solution bogQ Posted January 17, 2014 Solution Posted January 17, 2014 (edited) that will produce some large msgbox on win7 code returned from page can be diffrent on diffrent ie versions so try it like this and youl see that you will get your msgbox (there are faster wayes to strip that chars if needed but for fun they are in loop) $oIE = _IECreate("https://www.java.com/en/download/manual.jsp") $sString = _IEBodyReadHTML($oIE) Do $sString = StringReplace($sString,' ','') Until @extended = 0 Do $sString = StringReplace($sString,@LF&@LF,@LF) Until @extended = 0 MsgBox(0,'',$sString) ConsoleWrite($sString) anyway ConsoleWrite can still display the source with no replaces, so its probably some msgbox limit or something... Edited January 17, 2014 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.
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