Jump to content

Recommended Posts

Posted

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

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

Posted

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?

Posted

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.

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

Posted

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

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

Posted

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?

Posted

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

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
  • Recently Browsing   0 members

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