Jump to content

Internet Explorer popup problem


john_qa
 Share

Recommended Posts

Hello,

Is there any way to find out more properties(like "name","text") of the objects within an Internet Explorer popup?

I know there is the WinGetClassList ("title") command, but it only retrieves the clases of the objects and nothing more about them.

Don't be afraid of tomorrow, because today is the day you were afraid yesterday.

Link to comment
Share on other sites

First take a look at _IEAttach() in the help file. Once you have played with some of the examples for that come back and ask a more specific question.

I'm back!

I did what you said, and here is my problem again:

I have a popup(modaldialog) with one button on it ("ok") and a label ("Wrong password").

If I use WinGetText ( $title ) it retrieves the two texts above.

If I use WinGetClassList ( $title ) it retrieves the type of objects: button, static.

What I want is to get the objects from that dialog in a format like this:

button("ok")

static("wrong password") and so on.

I can't use _IEAttach because this dialog doesn't have an "Internet Explorer_Server1" control.

Is there a way to achieve the wanted results?

Don't be afraid of tomorrow, because today is the day you were afraid yesterday.

Link to comment
Share on other sites

From the helpfile:

_IEAttach ( $s_string [, $s_mode = "Title"] )

Parameters

$s_string String to search for (for "embedded" or "dialogbox", use Title sub-string or HWND of window)

$s_mode Optional: specifies search mode

Title = (Default) browser title

URL = url of the current page

Text = text from the body of the current page

HTML = html from the body of the current page

HWND = hwnd of the browser window

Embedded = title sub-string or hwnd of of the window embedding the control

DialogBox = title sub-string or hwnd of modal/modeless dialogbox

As for the "format" part you mentioned, I'm not quite sure what you mean, but if you can get the object type, you can get it's properties. For example, if you pass the button object into the variable $oButton, then $oButton.value will return the text on the button.

Edit: My mistake, as was pointed out to me, if the control is not "Internet Explorer_Server1", then the AutoIt Win* functions should be used. So disregard what I said about IEAttach.

Can you instead use something like ControlGetText to get your button's text? You can use WinGetText to get both texts and remove the buttons text to get them separate. I'm not sure if that helps you.

Edited by mikehunt114
IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]
Link to comment
Share on other sites

  • 2 weeks later...

I made some progress in my quest to retrieve properties from a dialog window, but now I'm stuck again.

I have a dialog with a checkbox on it. When I view the classes of the objects from this dialog, the checkbox is seen as a Button?

Is there a way to find out that a button is in fact a checkbox?

Don't be afraid of tomorrow, because today is the day you were afraid yesterday.

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