Sign in to follow this  
Followers 0
acidfear

Reading Text

5 posts in this topic

#1 ·  Posted (edited)

Is there a way to read a file , for ex a txt file from a website without opening up any browser?

So far i have this code but it only returns a zero :/

#include <GuiConstants.au3>
#include <ie.au3>

GuiCreate("MyGUI", 392, 321,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))

$Label_1 = GUICtrlCreateEdit("", 30, 30, 300, 180)
$Button_2 = GuiCtrlCreateButton("OK", 20, 260, 60, 30)

GuiSetState()
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case Else
    
EndSelect

$read = "http://zuko00.zu.funpic.org/loggggs.txt"
if $msg= $Button_2 Then
    $file = _IEBodyReadText($read)
    $read1 = GUICtrlRead($file)
    GUICtrlSetData($Label_1, $read1)
EndIf
WEnd
Exit
Edited by acidfear

Share this post


Link to post
Share on other sites



InetGet()/_InetGetSource()


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Is there a way to read a file , for ex a txt file from a website without opening up any browser?

So far i have this code but it only returns a zero :/

#include <GuiConstants.au3>
#include <ie.au3>

GuiCreate("MyGUI", 392, 321,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))

$Label_1 = GUICtrlCreateEdit("", 30, 30, 300, 180)
$Button_2 = GuiCtrlCreateButton("OK", 20, 260, 60, 30)

GuiSetState()
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case Else
    
EndSelect

$read = "http://zuko00.zu.funpic.org/loggggs.txt"
if $msg= $Button_2 Then
    $file = _IEBodyReadText($read)
    $read1 = GUICtrlRead($file)
    GUICtrlSetData($Label_1, $read1)
EndIf
WEnd
Exit
Your syntax is borked. if $msg= $Button_2 should be in your GUI Select Case structure.

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
Share on other sites

I tried inetget and _inetgetsource but they didnt work. Nothign displays :/

Share this post


Link to post
Share on other sites

I tried inetget and _inetgetsource but they didnt work. Nothign displays :/

And we are supposed to..... do what exactly if you can't get the source, how are we supposed to show/help you parse it?

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
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
Sign in to follow this  
Followers 0