Jump to content
Sign in to follow this  
Amo

Different frame

Recommended Posts

Amo

I don't know how to get different frame !!

I want to get frame :name=page00, but I only get chart_win2

Files Name:taiweb_page01.jsp

<html><head><title>快速下單</title>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
<link rel="stylesheet" href="Images/tt1.css" type="text/css">
</head>
<script src="futinfo.js"></script>

<frameset rows="10%,73%,17%">
    <frameset cols="512,512" framespacing="0" FRAMEBORDER="no" BORDER="0">
        <frame name=web_top_left noresize src="https://etrade.wls.com.tw/future/future_top_bear.htm" frameborder=0 marginheight=0 marginwidth=0 scrolling="auto">
        <frame name=web_top_right src="https://etrade.wls.com.tw/future/future_top_bear_right.htm" frameborder=0 marginheight=0 marginwidth=0 scrolling="auto" noresize>
    </frameset>
    <frameset cols="50%,50%">
        <frame name=page00 src="https://etrade.wls.com.tw/future/taiweb_page00.jsp" frameborder=0 marginheight=0 marginwidth=0 scrolling="auto" noresize>
        <!--frame name=page00_pic src="https://etrade.wls.com.tw/future/taiweb_page00_pic.jsp" frameborder=0 marginheight=0 marginwidth=0 scrolling="auto" noresize-->
        <frame name=page00_pic src="https://etrade.wls.com.tw/future/taiweb_page05.jsp" frameborder=0 marginheight=0 marginwidth=0 scrolling="auto" noresize>
    </frameset>
    <frame name=chart_win2 src="taiweb_page01.jsp" frameborder=0 marginheight=0 marginwidth=0 scrolling="auto" noresize>
    
</frameset>
</html>

I use _IEFrameGetCollection,it can get 5 Frames but only show "taiweb_page01.jsp" locationurl, I want to get another Frame!!

_IENavigate ($oIE2, @WorkingDir&"\taiweb_page01.jsp")
$oFrame3 = _IEFrameGetObjByName ($oIE2 , "page00_pic")
$oFrames = _IEFrameGetCollection ($oIE2)
$iNumFrames = @extended
For $i = 0 to ($iNumFrames - 1)
   $oFrame = _IEFrameGetCollection ($oIE2, $i)
   MsgBox(0, "Frame Info", _IEPropertyGet ($oFrame, "locationurl"))
Next

Share this post


Link to post
Share on other sites
DaleHohm

Suggest you add _IEErrorHandlerRegister() to the top of your script and show the output from your script above.

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
Amo

Suggest you add _IEErrorHandlerRegister() to the top of your script and show the output from your script above.

Dale

Hi Dale

Can you teach me more about how to use _IEErrorHandlerRegister() and how to get the frame

Thank you

--> IE.au3 V2.3-1 Error from function _IELoadWait, $_IEStatus_InvalidObjectType
--> IE.au3 V2.3-1 Warning from function _IEFormGetObjByName, $_IEStatus_NoMatch
--> IE.au3 V2.3-1 Error from function _IEFormElementGetObjByName, $_IEStatus_InvalidDataType
--> IE.au3 V2.3-1 Error from function _IEAction, $_IEStatus_InvalidDataType
--> COM Error Encountered in AutoOrder.au3
----> $IEComErrorScriptline = 3042
----> $IEComErrorNumberHex = 80070005
----> $IEComErrorNumber = -2147024891
----> $IEComErrorWinDescription = 存取被拒。
----> $IEComErrorDescription = 
----> $IEComErrorSource = 
----> $IEComErrorHelpFile = 
----> $IEComErrorHelpContext = 
----> $IEComErrorLastDllError = 0

--> COM Error Encountered in AutoOrder.au3
----> $IEComErrorScriptline = 3042
----> $IEComErrorNumberHex = 80070005
----> $IEComErrorNumber = -2147024891
----> $IEComErrorWinDescription = 存取被拒。
----> $IEComErrorDescription = 
----> $IEComErrorSource = 
----> $IEComErrorHelpFile = 
----> $IEComErrorHelpContext = 
----> $IEComErrorLastDllError = 0

--> COM Error Encountered in AutoOrder.au3
----> $IEComErrorScriptline = 3042
----> $IEComErrorNumberHex = 80070005
----> $IEComErrorNumber = -2147024891
----> $IEComErrorWinDescription = 存取被拒。
----> $IEComErrorDescription = 
----> $IEComErrorSource = 
----> $IEComErrorHelpFile = 
----> $IEComErrorHelpContext = 
----> $IEComErrorLastDllError = 0

--> COM Error Encountered in AutoOrder.au3
----> $IEComErrorScriptline = 1154
----> $IEComErrorNumberHex = 80020009
----> $IEComErrorNumber = -2147352567
----> $IEComErrorWinDescription = 存取被拒。
----> $IEComErrorDescription = 存取被拒。
----> $IEComErrorSource = 
----> $IEComErrorHelpFile = C:\WINDOWS\system32\mshtml.hlp
----> $IEComErrorHelpContext = 0
----> $IEComErrorLastDllError = 0

--> COM Error Encountered in AutoOrder.au3
----> $IEComErrorScriptline = 1169
----> $IEComErrorNumberHex = 80020009
----> $IEComErrorNumber = -2147352567
----> $IEComErrorWinDescription = 存取被拒。
----> $IEComErrorDescription = 存取被拒。
----> $IEComErrorSource = 
----> $IEComErrorHelpFile = C:\WINDOWS\system32\mshtml.hlp
----> $IEComErrorHelpContext = 0
----> $IEComErrorLastDllError = 0

--> IE.au3 V2.3-1 Warning from function _IEFormGetObjByName, $_IEStatus_NoMatch
--> IE.au3 V2.3-1 Error from function _IEFormElementGetObjByName, $_IEStatus_InvalidDataType
--> IE.au3 V2.3-1 Error from function _IEAction, $_IEStatus_InvalidDataType
--> IE.au3 V2.3-1 Error from function _IEAction, $_IEStatus_InvalidDataType
--> IE.au3 V2.3-1 Warning from function _IEGetObjByName, $_IEStatus_NoMatch
--> IE.au3 V2.3-1 Error from function _IETagNameGetCollection, $_IEStatus_InvalidDataType
--> IE.au3 V2.3-1 Error from function _IEAction, $_IEStatus_InvalidDataType

Share this post


Link to post
Share on other sites
DaleHohm

I can't read the asian characters, but I'm guessing it says "Access is denied"

You are hitting a cross-domain security restriction... you cannot access the content of a frame that is in a different domain than the parent document (even if the parent document is on your local machine).

Your only choice is to open the URL os the embedded fram in a new window and access the content there.

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
Amo

I can't read the asian characters, but I'm guessing it says "Access is denied"

You are hitting a cross-domain security restriction... you cannot access the content of a frame that is in a different domain than the parent document (even if the parent document is on your local machine).

Your only choice is to open the URL os the embedded fram in a new window and access the content there.

Dale

Thank you for your reply, This problem confuse me.

If I createObj $oIE4(taiweb_page01.jsp) ,when I click it that will open a new window in IE, Can I open it in $oIE2 ? don't open in IE

$GUIActiveX = GUICtrlCreateObj($oIE2, 10, 230, 980, 220)

GUICtrlCreateObj($oIE4,122,525 ,860, 120)
_IENavigate ($oIE4, @WorkingDir&"\taiweb_page01.jsp" )
$oForm2 = _IEFormGetObjByName ($oIE4, "OrderForm")
_IEImgClick ($oForm2, "https://etrade.wls.com.tw/future/Images/fu_button_sumit.gif")

Share this post


Link to post
Share on other sites
DaleHohm

I'm sorry. I don't understand your question. Are you saying a new IE window opens after a click? You can get a reference to it with _IEAttach

Dale

Edited by DaleHohm

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

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  

×