Sign in to follow this  
Followers 0
anothertester

Getting text from nested frames(?)

4 posts in this topic

Hello all,

I haven't been using Autoit for a while but I had some fun with it before.

Now I got lazy again and I wanted to make script that copies/pastes a HTML content to some file for me... or at least copy to the clipboard. But there's a problem - my script fails to return contents of the page.

The site I'm trying to get contents from is o-game.co.kr. This is Korean version of O-game.

The page source, when viewed, is like this

<frameset rows="*,0" frameborder="no" border="0" framespacing="0">
            <frame name="mainframe" src="/index.php?frameset=1" frameborder="0" scrolling="yes" noresize>
            <frame name="trk" src="http://analytics.gameforge.de/cp.php?game=ogame&action=visit&gr=&lang=kr&kid=" frameborder="0" noresize>
        </frameset>

But the actual contents being shown aren't like that.

Some sample of the contents I need to retreive are:

빌딩

자원

연구

쉽야드

함대

기술

갤럭시

방어시설

and

갤럭시

0:02:03 함대 함대가 행성 Kampchaka [4:452:1]에서 행성 LeGranBleu [4:452:3] 로 도착합니다. 미션: 공격.

0:02:15 함대 함대가 행성 Kampchaka [4:452:1]에서 행성 AquaMarine[4:456:2] 로 도착합니다. 미션: 공격.

I tried _IEFrameGetCollection and _IEDocReadHTML to get contents of frames but it doesn't return much...

Can anyone give me some kind of direction or tips?

Share this post


Link to post
Share on other sites



See if this gives you the text you are wanting.

#include <IE.au3>

$sURL = "http://o-game.co.kr/portal/?lang=kr&frameset=1"
$oIE = _IECreate($sURL)
ConsoleWrite(_IEBodyReadText($oIE) & @CR)
Yes it does work like a charm! Thank you very much. Now I can get the text I needed. :)

How did you find that url? I couldn't find it before...

Share this post


Link to post
Share on other sites

Your welcome!

It is the "src" value of the frame.

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