Jump to content
Sign in to follow this  
dushkin

Reaching an inner document

Recommended Posts

dushkin

Hi guys,

I attach to the post a part of an html file I need to work on.

I need to reach the lowest html node you see there, inside all the frames.

Can you advice me the way?

Please notice that not every frame\frameset has a name or an id to assist us to fetch it.

Many Thanks!

post-56238-12813660858573_thumb.jpg

Share this post


Link to post
Share on other sites
PsaltyDS

Where they have names you just use _IEFrameGetObjByName(), and where they don't use _IEFrameGetCollection() and the 0-based index (i.e. 0 = first, 1 = second). So in the example you posted:

$oFramSet1 = _IEFrameGetObjByName($oIE, "UserFrames") ; by name
$oFrameSet2 = _IEFrameGetCollection($oFrameSet1, 1) ; 1 = 2nd index
$oFrame = _IEFrameGetObjByName($oFrameSet2, "UserMain") ; by name
$oForm with _IEFormGetObjByName($oFrame, "frmReport") ; by name

:blink:


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
dushkin

Where they have names you just use _IEFrameGetObjByName(), and where they don't use _IEFrameGetCollection() and the 0-based index (i.e. 0 = first, 1 = second). So in the example you posted:

$oFramSet1 = _IEFrameGetObjByName($oIE, "UserFrames") ; by name
$oFrameSet2 = _IEFrameGetCollection($oFrameSet1, 1) ;  
$oFrame = _IEFrameGetObjByName($oFrameSet2, "UserMain") ; by name
$oForm with _IEFormGetObjByName($oFrame, "frmReport") ; by name

:blink:

Thanks PsaltyDS!

Found it!!! Mainly by trial and error...

$oFrameSet1 = _IEGetObjByName($oIE, "UserFrames") ; by name

$oFrameSet2 = _IEFrameGetCollection($oFrameSet1, 1) ; Don't know why but that was redundant... ;)

$oFrame = _IEFrameGetObjByName($oFrameSet1, "UserMain") ; by name

$oForm = _IEFormGetObjByName($oFrame, "frmReport") ; by name

Many thanks! :P

Edited by dushkin

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  

×