senthil 0 Posted April 19, 2011 Hi All, I am beginner to autoit. Trying to automate local host. I can able to read the login page of site by using _IEBodyReadText but after login i cant able to read text using _IEBodyReadText. It is returning value 0 at line number 17.Please help me on this. Thanks in advance Here my code 1. #include <IE.au3> 2. $oIE = _IECreate ("http://171.12.10.13:8080") 3. $sText = _IEBodyReadText ($oIE) 4. MsgBox (0,"Display",$sText) 5. sleep(1000) 6. ; Matching the string username in login page 7. $a=StringRegExp ( "$sText","username" ) 8. if ($a ==0) Then 9. send ("admin") 10. sleep("100") 11. send ("{tab}") 12. send ("admin") 13. send ("{Enter}") 14. EndIf 15. _IELoadWait($oIE); 16. $Text = _IEBodyReadText ($oIE) 17. MsgBox(0, "Body Text", $Text) Share this post Link to post Share on other sites
wakillon 404 Posted April 19, 2011 It seems your url is badbut _IEBodyReadText works well#include <IE.au3> $oIE = _IECreate ( "http://www.google.com") $sText = _IEBodyReadText ($oIE) MsgBox (0,"Display",$sText)What's the website url ? AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Share this post Link to post Share on other sites
PsaltyDS 41 Posted April 19, 2011 Don't put quotes around the $sText variable name: ; $a=StringRegExp ( "$sText","username" ) ; Wrong $a = StringRegExp($sText,"username") ; Corrected 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