zutto Posted May 18, 2008 Share Posted May 18, 2008 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. Link to comment Share on other sites More sharing options...
monoceres Posted May 18, 2008 Share Posted May 18, 2008 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! Link to comment Share on other sites More sharing options...
zutto Posted May 18, 2008 Author Share Posted May 18, 2008 (edited) 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 May 18, 2008 by zutto Link to comment Share on other sites More sharing options...
d4rk Posted May 18, 2008 Share Posted May 18, 2008 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 Link to comment Share on other sites More sharing options...
zutto Posted May 18, 2008 Author Share Posted May 18, 2008 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 Link to comment Share on other sites More sharing options...
DaleHohm Posted May 18, 2008 Share Posted May 18, 2008 it can't with _IE*, _IE* only support once the page is created with _IECreat()in your case, you cant use WinGetText() insteadSorry, 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 Link to comment Share on other sites More sharing options...
PsaltyDS Posted May 18, 2008 Share Posted May 18, 2008 (edited) 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 May 18, 2008 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 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now