Sign in to follow this  
Followers 0
Blastradius

Reading an Internet Page

18 posts in this topic

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

Thanks, i bet i can figure it out with this.

I dont feel like making a new topic so here's a new question:

How do you set the cursor in an edit field to the end so when its doing an update it will always appear at the end?

Share this post


Link to post
Share on other sites

I dont think thats possible... But you could read the edit - then append the stuff you need and put it back in the edit...


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

Share this post


Link to post
Share on other sites

I tried that method, but doing it that way makes the edit always look at the information at the top while the newest commands are shown at the very bottom. Unless theirs some way to set the scrolling of the edit to the bottom i dont think thats a good method.

Share this post


Link to post
Share on other sites

Well then its not an edit but an textarea ??


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

Share this post


Link to post
Share on other sites

No, its an edit with $WS_VSCROLL and $ES_READONLY.

Share this post


Link to post
Share on other sites

The input is not on the webpage :S


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

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

#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

Share this post


Link to post
Share on other sites

This really doesnt help me tough. Yes your example will also append but try clicking at the first line before you let it append a second line. It will always be added whereever your cursor (where u clicked) is. I need a way around that >.>

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

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

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

Aaah I get you now :lol: Thought the problem was inserting the text ... not to view the text :whistle: Well I'll look into it :)


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

Share this post


Link to post
Share on other sites

Allright =D, thanks in advance

Share this post


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

Share this post


Link to post
Share on other sites

You should make it read only :whistle:


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

Share this post


Link to post
Share on other sites

Whooo, why didnt i think of that?!

Anyway, thanks alot =D

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