
BLNJ000
Members-
Posts
10 -
Joined
-
Last visited
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
BLNJ000's Achievements

Seeker (1/7)
0
Reputation
-
if you added a sort of "wait tot seconds" between the open url and the html save could it allow the capture of the html variations introduced by the asynchronous scripts / commands? If yes ... how to do it? I do not need to store images, videos and the like in the final mht, I would ONLY need the HTML code of the page AFTER the complete loading (i.e. when scripts and commands inside it have generated and modified the various <tag>, <url> , <link> that are not in the "simple" html page). I need to grabb the html codeof the final moment, after the complete modification by the various .js .css. java, app, api etc.
-
I would also like to get this part of html which at the moment is not inserted in the.mht file created by the script: for example view part 1 and part 2 : part 1 [ from file AAA.mht obtained from app Chrome (13mb)] or this part (02 ) [ link + "Ctrl+Shift+I" + reload page ] I do not need to store images, videos and the like in the final mht, I would ONLY need the HTML code of the page AFTER the complete loading (i.e. when scripts and commands inside it have generated and modified the various <tag>, <url> , <link> that are not in the "simple" html page). I need to grabb the html codeof the final moment, after the complete modification by the various .js .css. java, app, api etc. This code [ is good] but grab just something , ( such as strings written by async commands ? or .Js ?) the part in the 2nd spoiler it should have been added to the html via a * .js loaded with the web page.
-
thanks for the reply. the trailing comma after "CDO.Message" I had noticed after posting, what does not satisfy me is the final result, that is the file.mht obtained. The idea was to get a result very similar to what you get using an app like "Save As Mht" in chrome [ h##ps://github.com/vsDizzy/SaveAsMHT or h##ps://chrome.google.com/webstore/detail/save-as-mht/hfmodljjaibbdndlikgagimhhodmobkc/related?hl=it ] / or to the chrome <"inspect" + reload page> command. To simplify, I do not need to save Everything in a single file [images, scripts, css, ...] (the weight of the file would go to the sky), what I would like to obtain is only the equivalent of the HTML code of the page AFTER the complete loading , that is when script / java (etc.) have modified it by inserting references to links of images or text that are not present on the starting "html" page. [ or to the chrome <"inspect" + reload page> command ]. So I was wondering if you could somehow improve the script by integrating / inspired by the app code or if similar functions have already been written over the years. place an example: result obtained with the script [1] (492Kb) and result obtained with app for chrom [2] (13Mb)
-
hello, i am looking for a way to save a webpage as mht file [ without using browser app] , i would need someting that having as input like "url" ,"final destination / folder" and "name.mht" save the page. I found an oooold executable ( 2007) "SavePage" but it works halfway , a lot of things are non written; and i have a similar result with examples found in forum post like : " convert to mht " the code i found is Global $iMsg, $Flds, $iConf, $prueba, $cdoSuppressAll $iMsg = ObjCreate("CDO.Message") ; Create Message object $iConf = ObjCreate("CDO.Configuration") ; Create Message Configuration Object $Flds = $iConf.Fields $iMsg.CreateMHTMLBody("http://mangazukinew.online/tensei-ouji-wa-gakuen-demo-daraketai-side-story-chapter-1",0);("http://www.dbforums.com/archive/index.php/t-783832.html", 0) ;, "Username", "Password" 'If needed (user & pass) Global $Stm $Stm = ObjCreate("ADODB.Stream") $Stm.Type = 2 ; TypeBinary $Stm.Charset = "US-ASCII" $Stm.Open Global $iDsrc, $Filepath $Filepath = "G:\TEST\testAu3.mht";"c:\archivename.mht" ; Path to save the file & filename $iDsrc = $iMsg.DataSource ; response.Write("Ha cargado el contenido de la pagina en el stream") $iDsrc.SaveToObject($Stm, "_Stream") FileDelete($Filepath) ; overwrite seems invalid $Stm.SaveToFile($Filepath, 1) ; 1 = overwrite if file exists and the result ( file.mht) is almost (+/-) the same and i can't use the function in the same topic because it report an error / lack of "something" declaration on the <CDO.Message> #include <ie.au3> #include <MsgBoxConstants.au3> _INetGetMHT("http://mangazukinew.online/tensei-ouji-wa-gakuen-demo-daraketai-side-story-chapter-1" , "G:\test\testAU3.mht"); Func _INetGetMHT( $url, $file ) Local $msg = ObjCreate("CDO.Message"), If @error Then Return False Local $ado = ObjCreate("ADODB.Stream") If @error Then Return False With $ado .Type = 2 .Charset = "US-ASCII" .Open EndWith $msg.CreateMHTMLBody($url, 0) $msg.DataSource.SaveToObject($ado, "_Stream") FileDelete($file) $ado.SaveToFile($file, 1) $msg = "" $ado = "" Return True EndFunc so , how update the code in order to get more data in the obtainable file.mht ? or can a better result be obtained by completely changing the commands? I need a hand, please. I would need a result similar to the one obtainable with the "add on" for browsers such as <Save as Mht> for chrome... help ...
-
Hi, I'm trying to understand if I can use WinHttp to make my idea but I have some problems starting from the basics : I tried the script of the initial example ( also tried with "google.com" + "GET" ), reading the post I found an example posted by another user declared functional, I also tried the one and after try the example for <_WinHttpQueryDataAvailable> I get the error message set in the sript <<Site is experiencing problems (or you).>> I found out that I was being blocked by the farewall (so I enabled the operation) and things got a little better. but I still have some doubts, for example if I try with "google.com" + "GET","google.com" as a result I get something like this: a) is this right ? is there any setting that does not make those work (websites aside) ? b) if I didn't get it wrong the reference link must point to a page but if the address is for example an image or an image container it doesn't work or is there any option that I couldn't find ? for example I had to use: h**ps://www.lastampa.it/image/contentid/policy:1.38524329:1582812892/puppy-looks-like-cat-dog-hybrid-14-5e53858271f0f__700.jpg or h**ps://s://mangadex.org/chapter/832015/6 is there any way to result in the height and width values that can be found via the browser's inspect command ? [at the beginning I thought to point to the tag "img" but if the link is directed to an image the script does not work I fear ... is this so or is there a way ? ]
-
I tried the correct scrip on line 36 but I get this message: and even if the site exists in the tab I always see the message "page not reachable" or "exploration canceled". what should be corrected?
-
Thanks for the reply, I had not considered <_IECreate >, now I have set it as hidden. I did some tests starting from your example and I still have some problems , #include <IE.au3> ;Local $sURL = "https://www.lastampa.it/image/contentid/policy:1.38524329:1582812892/puppy-looks-like-cat-dog-hybrid-14-5e53858271f0f__700.jpg";ok ;Local $sURL = "https://wdtqhni.bfhcyshosymc.hath.network/h/11395e61c41b4b59f6fff9dcd19701251adea614-44268-1280-1807-jpg/keystamp=1584999000-e70b55b7d9;fileindex=58597854;xres=1280/003.jpg"; no (1280x1807) ;Local $sURL = "https://www.ilpost.it/wp-content/uploads/2019/05/gatto-attento.gif"; OK ;Local $sURL = "https://mangadex.org/data/d7d595b12c597e93846d1975cf312afd/u6.png"; no (1000x4340) Local $sURL = "https://mangadex.org/chapter/832015/6";no ;Local $sURL = " " Local $oIE = _IECreate ($sURL, 0,0 ,1, 0) $cImg = _IETagNameGetCollection ($oIE,"img") For $oImg in $cImg ;ConsoleWrite ($oImg.width & "/" & $oImg.height & @CRLF) ConsoleWrite ("Url File = " & $sURL & @CRLF & "width = " & $oImg.width & @CRLF & "height = " & $oImg.height ); ;Next _IEQuit($oIE);Close the browser and remove the object reference to it If I try to use some images, an window "view download" opens (I think it' IE , never seen before ... as said, I haven't used IE for years) in which it tells me whether to open or save the file ( and the scrip end here ). [ img of test = h**ps://mangadex.org/data/d7d595b12c597e93846d1975cf312afd/u6.png ] I also saw that with the presence of _IECreate now <_IEPropertyGet> seems to work , but whit the image of previus test the window " view download" open again ... If i try to read the initial page of the image the retur is this : but the real size of the immage are 1000x4340 ; ( so dont' work regularly) Do I have to add something or is there any other approach I could follow? (for the size speech there are no viable roads?)
-
Hello to All. I'm trying to write a simple script that had a link of an image file (jpeg, gif, bmp etc) tell me some information [without having to download the file itself] The info should be : - urls file [my input] - Width - Height - size so I looked in the guide and in the examples what could help me, but I have some problems ... I had thought of such a thing (not working): #include <IE.au3> ; _IEBodyReadHTML ( ByRef $oObject ) ; X Internet Explore Browser #include <MsgBoxConstants.au3> #include <ColorConstantS.au3>; #include <GUIConstantsEx.au3>; #include <GuiEdit.au3> #Include <Constants.au3> #include <InetConstants.au3> #include <Inet.au3> InfoFileUrl() Func InfoFileUrl () Local $sURL = "https://www.lastampa.it/image/contentid/policy:1.38524329:1582812892/puppy-looks-like-cat-dog-hybrid-14-5e53858271f0f__700.jpg" ;random test image taken on the web Local $LinkOb = $sURL Local $iWidth = _IEPropertyGet($LinkOb, "width") Local $iHeight = _IEPropertyGet($LinkOb, "height") ;;------InetGetSize ( "URL" [, options = 0] ) local $size = InetGetSize ( $LinkOb , 0 ) ; https://www.autoitscript.com/autoit3/docs/functions/InetGetSize.htm ;; ------- FileGetSize ( "filename" ) ; https://www.autoitscript.com/autoit3/docs/functions/FileGetSize.htm ;only for files already on h.d, not for things online ? ;Local $size = FileGetSize ( $LinkOb ) ConsoleWrite ("Url File = " & $LinkOb & @CRLF & "Width = " & $iWidth & @CRLF & "Height = " & $iHeight & @CRLF & "Size File = " & $size ) EndFunc ;==>InfoFileUrl Exit From other help posts on the forum I realized that the various _IE * etc * functions work on the Internet Explorer browser ... and I obviously ... use Chrome. [ and maybe that's why I had this error message <IE.au3 T3.0-2 Error from function _IEPropertyGet, $_IESTATUS_InvalidDataType> , or I have done something else wrong ?] another user suggested the use of inet*() I was interested in this solution because in the html code <img stile="......"> there should be Width & Height... ... I made some attempts but with no results. Assuming that the starting idea is feasible, could someone please tell me what / how to correct ?
-
Hello , I am new to the forum and I started getting interested in scripts a few days ago , so I apologize if I had to write nonsense. I would need to understand how to "read" (or use ?) the values that I put ( write) in the inpuptbox of the script . I have read and searched in the various examples that I managed to find but I must have missed something because in the test script that I am writing I cannot "see" these blessed values. For now I would simply like to see them in the message at the ok button [value 1 = ..... value2 = ....] but they don't fit. ( later they will be written on txt or used in the rest of the script but if I don't read them here it will have problems even after ... ) I ask if anyone can please tell me what I did wrong and what I should pay particular attention to in the future. this is where i got stuck (message button "ok") ;#include <Array.au3> ;#include <WinAPIShPath.au3> ;#include <WinAPIFiles.au3> #include <MsgBoxConstants.au3> #include <ColorConstantS.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #include <GuiEdit.au3> #include <GuiListView.au3> #include <WindowsConstants.au3> Var1e2() Func Var1e2() Global $hGUI = GUICreate("value test 1 e 2", 700, 210) GUISetBkColor(0xffffff) GUISetFont(13, 200) Global $idLabel = GUICtrlCreateLabel("value 1", 20, 10, 130, 20) GUICtrlSetColor($idLabel, $COLOR_RED) $imp1 = GUICtrlCreateInput("", 20, 40, 550 ,25) _GUICtrlEdit_SetCueBanner($imp1, "write valuee 1",True) ;If @error Then Exit $wCas1 = GUICtrlRead($imp1) GUISetFont(13, 200) $idLabel = GUICtrlCreateLabel("value 2 ", 20, 80, 130, 20) GUICtrlSetColor($idLabel, $COLOR_RED) $imp2 = GUICtrlCreateInput("", 20, 110, 550 ,25) _GUICtrlEdit_SetCueBanner($imp2, "insert valueee 2",True) GUISetFont(14, 300) Global $iOKButton = GUICtrlCreateButton("OK", 70, 160, 60) GUISetFont(10, 300) Global $AnnullaButton = GUICtrlCreateButton(" ESC ", 150, 160, 90 ) GUISetState(@SW_SHOW, $hGUI) Local $iMsg = 0 While 1 $iMsg = GUIGetMsg() Switch $iMsg Case $iOKButton ;MsgBox($MB_SYSTEMMODAL, "GUI Event", "You selected the OK button.") MsgBox($MB_SYSTEMMODAL, "GUI Event", $wCas1 & @CRLF $imp2) ExitLoop Case $AnnullaButton MsgBox($MB_SYSTEMMODAL, "GUI Event", "you canceled the entry , try again") ;ExitLoop Case $GUI_EVENT_CLOSE MsgBox($MB_SYSTEMMODAL, "GUI Event", "You selected the Close button. Exiting...") ExitLoop EndSwitch WEnd GUIDelete($hGUI) EndFunc ;==>Var1e2 (I probably also have too many includes) note = note = the data entered are text (letters + numbers)