Jump to content

Recommended Posts

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 :ILA2:

*sorry for my many questions,

Edited by zxtnt09
Link to comment
Share on other sites

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 by zxtnt09
MsgBox
Link to comment
Share on other sites

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 by zxtnt09
html
Link to comment
Share on other sites

Local $dData = InetRead("http://example.com/")
Local $sData = BinaryToString($dData, 4)

ConsoleWrite($sData & @LF)

I get...

<!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.

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

Try this to force a reload.

Local $dData = InetRead("http://example.com/", 1)
Local $sData = BinaryToString($dData, 4)

ConsoleWrite($sData & @LF)

or this

Local $dData = InetRead("http://example.com/", 1)
Local $sData = BinaryToString($dData)

ConsoleWrite($sData & @LF)

 

Edited by JohnOne

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

  • Moderators

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
WEnd

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Moderators

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

 

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...