Uriziel01 Posted June 28, 2007 Share Posted June 28, 2007 I got a question... how to open a link in IE (i included IE.au3) in some frame, i mean for ex. we got 3 frames: Menu, ToolBar, and Mainframe. And i want to open an link from the Menu in the Mainframe. Ie_Navigate open only links in whole new site. And my question num. 2: How to view a source of the MainFrame or some other frame on my actual page ? For example i open'd site ogame.pl and log in on my acc, in source (_INetGetSource) i see only short code with link's to the frames files. p.s-i write this always but... Sorry for my bad english but im learning it, im from central Europe (Poland-PL) Link to comment Share on other sites More sharing options...
PsaltyDS Posted June 28, 2007 Share Posted June 28, 2007 (edited) I got a question... how to open a link in IE (i included IE.au3) in some frame, i mean for ex. we got 3 frames: Menu, ToolBar, and Mainframe. And i want to open an link from the Menu in the Mainframe. Ie_Navigate open only links in whole new site. And my question num. 2: How to view a source of the MainFrame or some other frame on my actual page ? For example i open'd site ogame.pl and log in on my acc, in source (_INetGetSource) i see only short code with link's to the frames files. p.s-i write this always but... Sorry for my bad english but im learning it, im from central Europe (Poland-PL) I'm just learning this myself, but the first thing to point out is that the instance of IE is an "object", then the frame is another object. So here's a quick demo that worked for me: #include <ie.au3> $oIE = _IECreate("www.ogame.pl") $oMainFrame = _IEFrameGetObjByName($oIE, "mainframe") $sHTML = _IEBodyReadHTML($oMainFrame) MsgBox(64, "Debug", $sHTML) The first line "includes" Dale Hohm's excellent IE.au3 UDF. The second line creates an instance of IE, opened to the given URL. Note that it returns an object representing the instance of IE, which I have cleverly named "$oIE". The third line gets the object representing the frame you are interested in, and saves it as $oMainFrame. The fourth line reads the HTML of the frame and saves it as a string variable, $sHTML. The fifth line presents the results. Hope it helped you. It helped me to do that. Edited June 28, 2007 by PsaltyDS 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 Link to comment Share on other sites More sharing options...
Uriziel01 Posted June 28, 2007 Author Share Posted June 28, 2007 (edited) Superb ! Really thanx mean, your code work exellent ! And what with opening a link in selected frame ? Is thah so easy too ? p.s-BTW you helped me very much witch code im using it now in my all program! Edited June 28, 2007 by Uriziel01 Link to comment Share on other sites More sharing options...
PsaltyDS Posted June 28, 2007 Share Posted June 28, 2007 Superb ! Really thanx mean, your code work exellent ! And what with opening a link in selected frame ? Is thah so easy too ? Read the help file for all the _IE* functions, and take a look at the sample scripts. Pay particular attention to _IEImgClick(), _IELinkClickByIndex(), and _IELinkClickByText().Cheers! 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 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now