Jump to content

_IEAttach advice


Recommended Posts

Dear AutoIt community,

I'm trying to wrap my head around the _IEAttach function and besides the usual suspects like the AutoIt Help File, this forum, and Googling I just can't seem to find a straight answer.

I want my script to do the following:

1. Go to this website (website 1), login, enter a search into a form.

2. 'Read' the search result table.

3. For each row in the table read some of the cells into variables.

3.1 Click on a link in one of the cells and wait for the popup window to load.

3.2 Attach to the popup window and loop through the tables (that have been put into arrays) taking some information out of the array into variables.

3.3 Close the popup window.

4. Open up a new IE window with a whole new URL (website 2) and attach to it. Do some stuff with the variables gained from website 1 (from the search result table, and from the popup window).

5. Close website 2, and attach to website 1.

6. Tick a box for that row.

7. Repeat (moving on to the next row) until there are no more rows in the table.

8. Press save and exit.

With a bit of help I've gotten to step 3.1.

However I'm stuck understanding how the whole 'attach to this IE window thing' works and have a number of questions:

Q1: Do I need three object variables for _IEAttach in order to get AuotIt to switch between them? Something like $oIEWebsite1, $oIEPopup, and $oIEWebsite2?

Q2: How do I switch AutoIt between windows and then run code? Does anyone have any example code?

Q3: How do I know AutoIt has successfully attached to the right IE window? Is there some sort of truth test I can run for debugging?

Q4: Likewise, how do I check that the HWND is correct?

Q5: For the _IEAttach function, is $s_mode = "Title" the string in between the HTML <title></title> tags?

Thanks to all those who reply.

Kind regards,

icu

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...