Jump to content

Reading an Internet Page


Recommended Posts

Heyya,

on my little project i have started, i am trying to get some information from an internet site. This isnt a problem if you simply use _InetGetSource, however my project revolves more around speed. Having to wait for the source and THEN start parsing all the other information (obtained somewhere else) really does not work for me. My solution would be making a hidden explorer which can open an url, and give me the contents once other parsing is complete. So here's my question:

How do i make a hidden explorer window? Then, how do i let it open an URL and how will i retrieve the source?

Thank you xD

Link to comment
Share on other sites

Hava a look in the helpfile for _IECreate() :whistle:

and while your looking there you should see in the other _IE examples and the rest of your questions should be solved :)

Edited by Shevilie

Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit

Link to comment
Share on other sites

#include <GUIConstants.au3>

GUICreate("My GUI edit")  ; will create a dialog box that when displayed is centered

$myedit=GUICtrlCreateEdit ("First line"& @CRLF, 176,32,121,97,$ES_AUTOVSCROLL+$WS_VSCROLL)

GUISetState ()

; will be append dont' forget 3rd parameter
GUICtrlSetData ($myedit, "Second line",1)

; Run the GUI until the dialog is closed
While 1
    $msg = GUIGetMsg()
   
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend
MsgBox(0,0,GuiCtrlRead($myedit))

Edited by Shevilie

Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit

Link to comment
Share on other sites

The sleep is to move the cursor when you test it

EDIT : Better way :whistle:

#include <GUIConstants.au3>

GUICreate("My GUI edit")  ; will create a dialog box that when displayed is centered

$myedit=GUICtrlCreateEdit ("First line"& @CRLF, 176,32,121,97,$ES_AUTOVSCROLL+$WS_VSCROLL)

GUISetState ()
Sleep(2000)
; will be append dont' forget 3rd parameter
$test = GuiCtrlRead($myedit)
$test = $test & "Second line"
GUICtrlSetData ($myedit, $test)

; Run the GUI until the dialog is closed
While 1
    $msg = GUIGetMsg()
   
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend
Edited by Shevilie

Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit

Link to comment
Share on other sites

Sure that works, but as i said i used that. Check this example, this will happen.

#include <GUIConstants.au3>

GUICreate("My GUI edit")  ; will create a dialog box that when displayed is centered

$myedit=GUICtrlCreateEdit ("First line"& @CRLF, 176,32,121,97,$ES_AUTOVSCROLL+$WS_VSCROLL)

GUISetState ()
Sleep(2000)
; will be append dont' forget 3rd parameter
$count = 0
While 1
    $test = GuiCtrlRead($myedit)
    $test = $test & "Line " & $count & @CRLF
    GUICtrlSetData ($myedit, $test)
    
    $count += 1
    Sleep( 100 )
    if $count > 20 Then ExitLoop
WEnd

; Run the GUI until the dialog is closed
While 1
    $msg = GUIGetMsg()
   
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend

See it doesnt scroll down like it should?

Link to comment
Share on other sites

Its not beautiful, but it works :whistle:

#include <GUIConstants.au3>

GUICreate("My GUI edit")  ; will create a dialog box that when displayed is centered

$myedit=GUICtrlCreateEdit ("First line"& @CRLF, 176,32,121,97,$ES_AUTOVSCROLL+$WS_VSCROLL)

GUISetState ()
Sleep(2000)
; will be append dont' forget 3rd parameter
$count = 0
While 1
    ControlSend("My GUI edit", "", $myedit, "{END}")
    GUICtrlSetData ($myedit, @CRLF & "Second line",1)
    $count += 1
    Sleep( 100 )
    if $count > 20 Then ExitLoop
WEnd

; Run the GUI until the dialog is closed
While 1
    $msg = GUIGetMsg()
   
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend

Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit

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