Jump to content
Sign in to follow this  
atzoref

Problem with Text from HTML page

Recommended Posts

atzoref

Hi,

I am using this function to read the the text from Internet Explorer,

$sText = _IEBodyReadText($oIE)

It works good until now.

After this I use this function to search a specific string in this text:

StringInStr($sText,$Num & ". command 0 completed")

The problem is that it is doesn't recognize on some cases the string to find, even when I see the string is actually there on the HTML page.

(MsgBox not shows all the text due to screen limitation and there is no scroolbar to the popup to debug)

I have 2 question:

1) Is there a limitation of the text which fetch from the BODY of the HTML with the _IEBodyReadText($oIE) function?

2) Is there a limitation of the text which can works with the StringInStr function?

Thanks.

Edited by atzoref

Share this post


Link to post
Share on other sites
water

Replace MsgBox with ConsoleWrite and you will see all the text in the output pane of SciTE.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-01-27 - Version 1.3.3.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
DaleHohm

...and there are no practical limitations to string length in either of those functions.

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
atzoref

But do you know if there is may be a limitation to the string in these functions?

Share this post


Link to post
Share on other sites
water

The maximum - theoretical - string length is about 2GB.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-01-27 - Version 1.3.3.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
kylomas

atzoref,

If you can identify a page that FAILS your string comparison then look at the part that you think should match using a hex editor. I've seen some pages that have what looks like a "space" but is not a "x20".

Good Luck,

kylomas

edit: corrected stupid grammar

Edited by kylomas

Forum Rules         Procedure for posting code

"I like pigs.  Dogs look up to us.  Cats look down on us.  Pigs treat us as equals."

- Sir Winston Churchill

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  

×