Jump to content

how can i read a text from a page


Kinhow
 Share

Recommended Posts

as wOuter stated IE.au3

is awesome!

from one of his examples

#include <IE.au3>

$oIE = _IECreate()
_IENavigate($oIE, "http://www.autoitscript.com/")

$body = _IEBodyReadHTML($oIE)

If StringInStr($body, "automation") Then
    MsgBox(0, "Success", "The string was found")
    $newbody = StringReplace($body, "automation", "AUTOMATION - Yeah!")
    _IEBodyWriteHTML($oIE, $newbody)
Else
    MsgBox(0, "Fail", "The string was NOT found")
EndIf

Exit

you can see all of Dales IE stuff here

http://www.autoitscript.com/forum/index.php?showtopic=13398#

8)

NEWHeader1.png

Link to comment
Share on other sites

well i added the file into /include.

but then when i run the script i get this error msg:

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

Line 777 (File "c:/blablabla"):

If IsObj($o_object.elements) Then

If IsObj($o_object.e^ ERROR

Error: Unable to parse line.

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

what this?

Link to comment
Share on other sites

As it states at the top of the IE.au3 post, please be certain you are running the beta version of AutoIt required for COM support...

Dale

well i added the file into /include.

but then when i run the script i get this error msg:

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

Line 777 (File "c:/blablabla"):

If IsObj($o_object.elements) Then

If IsObj($o_object.e^ ERROR

Error: Unable to parse line.

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

what this?

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

i downloades the last version and it still doesnt work...

am i correct? or do i have to download another version?

if yes plz post the direct link.

Does latest version to you mean "beta" version? There is a link to the beta at the bottom of the downloads page.

Check the version you are running with the following:

MsgBox(0,"AutoIt Version",@AutoItVersion)

At this writing, the latest beta is 3.1.1.90

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

i am working on it, but is there a way to read on an already opened IE window instead of using:

$oIE = _IECreate()

$body = _IEBodyReadHTML($oIE)

cuz im having problems with this _IECreate, sometimes it works, sometimes just dont...

Link to comment
Share on other sites

i am working on it, but is there a way to read on an already opened IE window instead of using:

$oIE = _IECreate()

$body = _IEBodyReadHTML($oIE)

You obviously need an _IENavigate() in what you have here, but I presume you know that.

To attach to an existing IE instance, see _IEAttach()

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

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