Jump to content

2 questions from newbie ;D


Recommended Posts

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

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.

:rolleyes:

Edited 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

Superb ! Really thanx mean, your code work exellent ! And what with opening a link in selected frame ? Is thah so easy too ? :rolleyes: p.s-BTW you helped me very much witch code im using it now in my all program!

Edited by Uriziel01
Link to comment
Share on other sites

Superb ! Really thanx mean, your code work exellent ! And what with opening a link in selected frame ? Is thah so easy too ? :rambo:

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!

:rolleyes:

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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...