Jump to content
Sign in to follow this  
zutto

need help at litle IE script

Recommended Posts

zutto

yeah i'm dumb i know :)

#include <IE.au3>

WinWait("x","")
If Not WinActive("x","") Then WinActivate("x","")
WinWaitActive("x","")

$body = _IEBodyReadHTML()

If StringInStr($body, "Disconnected from server.") Then
    MsgBox(0, "Success", "The string was found")
Else
    MsgBox(0, "Fail", "The string was NOT found")
EndIf

Exit

dont know it whines about line 7 but i dont know howto fix it ;/

it says: "Error: incorrect number of parameters in function call."

Regards.

Share this post


Link to post
Share on other sites
monoceres

First you need to use IECreate() and then you can use the object it returned in _IEBodyReadHTML().

Please refer to the help file for more info.

:)


Broken link? PM me and I'll send you the file!

Share this post


Link to post
Share on other sites
zutto

First you need to use IECreate() and then you can use the object it returned in _IEBodyReadHTML().

Please refer to the help file for more info.

:)

but if i want to use that script to window what is allready open is that possible?

EDIT: or how do i read text from IE window what is allready open then?

Edited by zutto

Share this post


Link to post
Share on other sites
d4rk

it can't with _IE*, _IE* only support once the page is created with _IECreat()

in your case, you cant use WinGetText() instead


[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

Share this post


Link to post
Share on other sites
zutto

it can't with _IE*, _IE* only support once the page is created with _IECreat()

in your case, you cant use WinGetText() instead

so there is no way to read that text from active window?

sleep("2000")


if wingettext("x","Disconnected from server.") Then
    MsgBox(0, "Success", "The string was found")
Else
    MsgBox(0, "Fail", "The string was NOT found")
    endif

that didnt work... it always says that fail

Share this post


Link to post
Share on other sites
DaleHohm

it can't with _IE*, _IE* only support once the page is created with _IECreat()

in your case, you cant use WinGetText() instead

Sorry, this is not accruate. Please 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

Share this post


Link to post
Share on other sites
PsaltyDS

but if i want to use that script to window what is allready open is that possible?

EDIT: or how do i read text from IE window what is allready open then?

Working with the IE document requires first getting an object reference to it. In most examples you see this as $oIE. In the case where you open a new instance of IE, it looks like this:
$oIE = _IECreate("http://www.google.com")

In the case where IE is already open you can use _IEAttach() like this:

$oIE = _IEAttach("http://www.google.com", "url")

There is also an option in _IECreate() to first check if the page is already opened in IE, and create a new instance if not.

Read the help file entries and try the example scripts there.

:)

Edit: Doh! Dale beat me to it!

Edited by PsaltyDS

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.