Jump to content

Reading Text


 Share

Recommended Posts

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
Link to comment
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

Link to comment
Share on other sites

  • Moderators

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?

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.

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...