Sign in to follow this  
Followers 0
VVDOOM

Need Help Reading A Web Page - PLEASE

5 posts in this topic

Here is the function I have that runs when i click the button. i used a sample web page in this example, it is not the page ill need to scan, but if i can learn how to scan a page ill be one step closer to doing what I need to do.

It pulls up the messag box but there is only a 0 in the message box.. so not sure what is going wrong.. i also tried putting in $url instead of $oIE but still only the 0 shows up. If anyone can assist it would be greatly appreciated...

----------------------------------------------------------

Func ButtonFunction1()

$url = "http://www.n17.com/"

$oIE = _IEAttach ("Network 17 - Windows Internet Explorer")

$sHTML = _IEDocReadHTML ($oIE)

MsgBox(0, "DUH", $sHTML)

EndFunc

----------------------------------------------------------

THANKS..

Share this post


Link to post
Share on other sites



#Region    ;************ Includes ************
#Include <IE.au3>
#EndRegion ;************ Includes ************
$sUsername = "First"
$sPassword = "Last"
$sUrl = "http://www.n17.com/"
$oIE = _IECreate($sUrl, 0, 1, 0, 1)
$oHWND = _IEPropertyGet($oIE, "hwnd")
WinSetState($oHWND, "", @SW_MAXIMIZE)
$oForm = _IEFormGetCollection($oIE, 2)
$oUsername = _IEFormElementGetObjByName($oForm, 'fname')
$oPassword = _IEFormElementGetObjByName($oForm, "lname")
_IEFormElementSetValue($oUsername, $sUsername)
_IEFormElementSetValue($oPassword, $sPassword)
$sHTML = _IEDocReadHTML ($oIE)
;~ _IEFormSubmit($oForm)
MsgBox(0, "DUH", $sHTML)


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

Sorry but that just did not work... what is that last name, first name, form element???

I need to read the web page, dump the source to the message box.. once i can do that, then i can play with the info in the string, pull out what i am looking for..

Thanks for any assistance...

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

#include <IE.au3>
$url = 'http://www.n17.com/'
$oIE = _IEAttach ($url,'URL')
$sHTML = _IEDocReadHTML ($oIE)
MsgBox(0, "DUH", $sHTML)

1)

if your using or need to use name of documents title as string try

_IEAttach ('Network 17')

and not

_IEAttach ('Network 17 - Windows Internet Explorer')

why?!!

sub-string of main document title, so this is document title and not win title

2)

if you do need to use full title or part of title as wintitle use it as

_IEAttach ('Network 17 - Windows Internet Explorer','WindowTitle')

3)

newer the less i think that 'URL' in upper code is nice solution 4 it

hope its all clear? :)

Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites

thank you very much, that scanned the page, put the source code into $sHTML...

now i can work on the rest of the code, which i may ask questions about later..

THANKS!!! This is a great group of people here.... Surely Karma will be awarded to everyone helping others..

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