zxtnt09 Posted September 22, 2015 Posted September 22, 2015 (edited) Hi again,i have one question ! ,how we can use a "inetread" without any changes in doc,it's meant : for example in this address we have this source : (Address : http://example.com)<!doctype html> <!-- i have <br/> ( Enter ) --> <html> <!-- i have enter too --> <head> <!-- i have too --> <title>i am in autoit :) </title> <meta charset="utf-8"> </head> <body> <p> i want to go in autoit :( </p> <a href="http://autoitscript.com">autoit</a> </body> </html>in this source you see many "Enter", now how we can have this (source) by "inetread" or "inetget" or something like that,i try to use that with "inetread" but it have not any "enter"!thanks alot *sorry for my many questions, Edited September 22, 2015 by zxtnt09
JohnOne Posted September 22, 2015 Posted September 22, 2015 *sorry for my many questions,Don't worry about it, I could not understand a single one. zxtnt09 1 AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
zxtnt09 Posted September 22, 2015 Author Posted September 22, 2015 (edited) Don't worry about it, I could not understand a single one.i need return "exactly" source code from WebSite,it's meant if in source have any "enter" ( break to next line ) , etc. i need that.for example : if we have some thing like that from web , i want that : **** **** *** *** ** ** * * * * ** ** *** *** **** ****Retrun msgbox(1,"it was from website",$fromWebSite) Edited September 22, 2015 by zxtnt09 MsgBox
JohnOne Posted September 22, 2015 Posted September 22, 2015 What is the code you tried and the website? zxtnt09 1 AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
zxtnt09 Posted September 22, 2015 Author Posted September 22, 2015 (edited) What is the code you tried and the website?Local $dData = InetRead("http://example.com/") Local $sData = BinaryToString($dData, 4) $editbox = GUICtrlCreateEdit($sData, 230, 55, 570, 599,$ES_AUTOVSCROLL + $WS_VSCROLL + $CBS_DISABLENOSCROLL,-1)it should echo something like that : '<!doctype html>' & @CRLF & _ '<html>' & @CRLF & _ '<head>' & @CRLF & _ '<title>Home Page</title>' & @CRLF & _ '<meta charset="UTF-8">' & @CRLF & _ '</head>' & @CRLF & _ '<body>' & @CRLF & _ '<p> This Is Paragraf </p>' & @CRLF & _ '</body>' & @CRLF & _ '</html>'HTML CODE : <!doctype html> <html> <head> <title>Home Page</title> <meta charset="UTF-8"> </head> <body> <p> This Is Paragraf </p> </body> </html>i need HTML Code ! Edited September 22, 2015 by zxtnt09 html
JohnOne Posted September 22, 2015 Posted September 22, 2015 The url is not working for me. zxtnt09 1 AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
zxtnt09 Posted September 22, 2015 Author Posted September 22, 2015 (edited) The url is not working for me.it is example domain, if you "right click" > inspect elemetns > you can see the "html" code, i want that ! Edited September 22, 2015 by zxtnt09
JohnOne Posted September 22, 2015 Posted September 22, 2015 Local $dData = InetRead("http://example.com/") Local $sData = BinaryToString($dData, 4) ConsoleWrite($sData & @LF)I get...expandcollapse popup<!doctype html> <html> <head> <title>Example Domain</title> <meta charset="utf-8" /> <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <style type="text/css"> body { background-color: #f0f0f2; margin: 0; padding: 0; font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; } div { width: 600px; margin: 5em auto; padding: 50px; background-color: #fff; border-radius: 1em; } a:link, a:visited { color: #38488f; text-decoration: none; } @media (max-width: 700px) { body { background-color: #fff; } div { width: auto; margin: 0 auto; border-radius: 0; padding: 1em; } } </style> </head> <body> <div> <h1>Example Domain</h1> <p>This domain is established to be used for illustrative examples in documents. You may use this domain in examples without prior coordination or asking for permission.</p> <p><a href="http://www.iana.org/domains/example">More information...</a></p> </div> </body> </html>I've know Idea why a basic function like that would not work. zxtnt09 1 AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
JohnOne Posted September 22, 2015 Posted September 22, 2015 (edited) Try this to force a reload.Local $dData = InetRead("http://example.com/", 1) Local $sData = BinaryToString($dData, 4) ConsoleWrite($sData & @LF)or thisLocal $dData = InetRead("http://example.com/", 1) Local $sData = BinaryToString($dData) ConsoleWrite($sData & @LF) Edited September 22, 2015 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Moderators Melba23 Posted September 22, 2015 Moderators Posted September 22, 2015 zxtnt09,The InetGet call is returning the data with a simple "0x0A" for EOL - this works for a ConsoleWrite but not in an Edit control. To correctly display there you need to convert this to the standard Windows "0x0D0A":#include <GUIConstantsEx.au3> $dData = InetRead("http://example.com/") $sData = BinaryToString(StringReplace($dData, "0A", "0D0A"), 4) $hGUI = GUICreate("Test", 500, 500) $cEdit = GUICtrlCreateEdit($sData, 10, 10, 400, 400) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEndM23 zxtnt09 1 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
zxtnt09 Posted September 22, 2015 Author Posted September 22, 2015 (edited) <snip>Oops,consolewrite, it was something like "console.log" in node.js ... hahathanks alot Edited September 22, 2015 by Melba23 Removed large quote
Moderators Melba23 Posted September 22, 2015 Moderators Posted September 22, 2015 zxtnt09,When you reply, please use the "Reply to this topic" button at the top of the thread or the "Reply to this topic" editor at the bottom rather than the "Quote" button - we know what we wrote and it just pads the thread unnecessarily.M23 zxtnt09 1 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
zxtnt09 Posted September 22, 2015 Author Posted September 22, 2015 JohnOne = thanks alot for your fast replayMelba23 = sorry <3 & thanks for more info
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