Sign in to follow this  
Followers 0
pacman1176

Help with _StringBetween using an IE function

6 posts in this topic

#1 ·  Posted (edited)

I am using

$oStatsFrame = _IEFrameGetObjByName ($oIE, "invent") ; object/frame stat frame

$statsClip = _IEBodyReadText ($oStatsFrame)

and on the webpage it returns the text. This is how it is formatted via the source, but this isn't how it is returned.

<deleted out for privacy concerns>

This is how it is returned:

<deleted out for privacy concerns>

My goal is to get certain variable values, such as the "1,000" and "259,573", and I tried using the _StringBetween, but there is the </TD><TD> between "Gold: " and "(Bank:" and I don't think autoit picks it up. And I have had no success with how _StringBetween formats the return. I'm sure this is really simple and I just am not looking far enough into a function.

Also note that the numbers will change, so it's not a matter of counting characters.

I've tried everything I know, someone shine their light!

Edited by pacman1176

Share this post


Link to post
Share on other sites



Use _IEDocReadHTML to get the actual source.

$source = _IEDocReadHTML($window)
If you want to use _StringBetween to get those values, though, you will have to make each <TD> and </TD> somehow different. Try doing <1><TD> and </TD></1>.. that should work, then use <2>, <3>, and so on.


[center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center]

Share this post


Link to post
Share on other sites

Actually I would recommend _IETableWriteToArray -- you seem to want exactly the results it is intended to provide.

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

Aha! I answered my own question. I'll try the <1> thing for the other hard to grab ones.

Share this post


Link to post
Share on other sites

You guys are amazing at what you do. Thank you for helping me figure this out! It's truely appreciated. Dale, your IE is my savior!

Share this post


Link to post
Share on other sites

No problem.

(for the one and two thing :) )


[center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center]

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  
Followers 0