Sign in to follow this  
Followers 0
RandomGuest

A Few Questions

3 posts in this topic

I've read the help files and a few other posts on these forums but I'm still not entirely confident on how to use Au3 to go to a URL & recover relevant data without using the basic macro functions that work in the foreground: run, send etcetera. I want to build a program which records the information from a pre-existing online (PHP) database into a useable (TXT) format for another script. I've tried to do this the basic way (using the macro commands like run, click etcetera) but I get stuck because I've no idea how to tell the script what text 'marks' the relevant text i.e: blablabla"somemorebla"blablaMARKER"relevantinformationbla"MARKER.

Help would be appreciated, I've tried to be coherent but it's nearly 1am :whistle:

Share this post


Link to post
Share on other sites



I've read the help files and a few other posts on these forums but I'm still not entirely confident on how to use Au3 to go to a URL & recover relevant data without using the basic macro functions that work in the foreground: run, send etcetera. I want to build a program which records the information from a pre-existing online (PHP) database into a useable (TXT) format for another script. I've tried to do this the basic way (using the macro commands like run, click etcetera) but I get stuck because I've no idea how to tell the script what text 'marks' the relevant text i.e: blablabla"somemorebla"blablaMARKER"relevantinformationbla"MARKER.

Help would be appreciated, I've tried to be coherent but it's nearly 1am :whistle:

is this what you mean?

#include <GUIConstants.au3>
#include <IE.au3>

_IEErrorHandlerRegister ()

$oIE = _IECreateEmbedded ()
GUICreate("Embedded Web control Test", 640, 580, _
        (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, _
        $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)
$GUIActiveX = GUICtrlCreateObj($oIE, 10, 40, 600, 360)


GUISetState()     ;Show GUI

_IENavigate ($oIE, "http://www.autoitscript.com")
$towrite=_IEDocReadHTML ($oIE)
$flopen=fileopen("data.txt",2)
filewrite($flopen,$towrite)
fileclose($towrite)
; Waiting for user to close the window
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
endselect
WEnd

GUIDelete()

Exit

[quote name='PsaltyDS' post='635433' date='Jan 27 2009, 07:04 AM']Larry is a mass murderer?! It's always the quiet, clean cut, bald guys... [/quote]

Share this post


Link to post
Share on other sites

is this what you mean?

#include <GUIConstants.au3>
#include <IE.au3>

_IEErrorHandlerRegister ()

$oIE = _IECreateEmbedded ()
GUICreate("Embedded Web control Test", 640, 580, _
        (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, _
        $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)
$GUIActiveX = GUICtrlCreateObj($oIE, 10, 40, 600, 360)
GUISetState()    ;Show GUI

_IENavigate ($oIE, "http://www.autoitscript.com")
$towrite=_IEDocReadHTML ($oIE)
$flopen=fileopen("data.txt",2)
filewrite($flopen,$towrite)
fileclose($towrite)
; Waiting for user to close the window
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
endselect
WEnd

GUIDelete()

Exit
Thanks for showing me how to use IE in the background. Have you any advice on the latter issue of extracting the relevant data? I've found a database similar to the one I want to copy on www.yuhioh-deck.com, visit http://www.yugioh-deck.com/ViewDeck.php?deckid=1039555161 for the page listing the different items. For each item I want to save: how many of the same image there are (i.e. the circles, if there are three I want to write LVL3 to the textfile etc) the location of the image and the blurb.

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