Jump to content

Problem in website, retrieve information


MaoMao
 Share

Recommended Posts

Problem in website, retrieve information

Try the sample in help file. _IEQuite.aus.

It did not work.

Does anyone know what's wrong with the sample $oMarquee line?

#include <IE.au3>

$oIE = _IECreate ("http://sourceforge.net", 0, 0)

; Display the innerText on an element on the page with a name of "sfmarquee"

$oMarquee = _IEGetObjByName ($oIE, "sfmarquee")

MsgBox(0, "SourceForge Information", $oMarquee.innerText)

_IEQuit ($oIE)

Link to comment
Share on other sites

There is no object on sourceforge.net called "sfmarquee". Right click on the webpage and choose "view source". You can get the object names from there.

Dating a girl is just like writing software. Everything's going to work just fine in the testing lab (dating), but as soon as you have contract with a customer (marriage), then your program (life) is going to be facing new situations you never expected. You'll be forced to patch the code (admit you're wrong) and then the code (wife) will just end up all bloated and unmaintainable in the end.

Link to comment
Share on other sites

Okay.

Still got the error for the line $oMarquee.innerText

Changed the source name in the source to "Download".

Error: Variable must be of type "Object".

#include <IE.au3>

$oIE = _IECreate ("http://sourceforge.net", 0, 0)

; Display the innerText on an element on the page with a name of "Download"

$oMarquee = _IEGetObjByName ($oIE, "Download")

MsgBox(0, "SourceForge Information", $oMarquee.innerText)

_IEQuit ($oIE)

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