Jump to content

AU3 Window Info tool in Google Chrome


Theorem
 Share

Recommended Posts

So, I'm trying to ControlSend my login information to Facebook (just fooling around with some easy stuff to get me started on AU3).

However, I can't find a way to identify the appropriate control IDs since the Window Info Tool sees the browser window itself as a control.

I.e. I only get

[CLASS:Chrome_RenderWidgetHostHWND; INSTANCE:1]

instead of what's rendered within it.

:/

Anyone know of another way to get the IDs of controls in browser windows (specifically Chrome)?

Thanks in advance :graduated:

Link to comment
Share on other sites

You have a little clue when you say "...instead of what's rendered within it." That's just what you are looking at, a graphic image rendered by the browser, not a GUI window with controls in it. Those are HTML elements of the DOM (Document Object Model), not controls.

With IE, you can use the COM interface via the _IE* functions of the IE.au3 UDF (see help file). Other browsers, like Chrome, Firefox, etc. do not expose a COM interface to the DOM and cannot be automated by AutoIt. In the case of Firefox there is an add-on that exposes some internals to a COM interface. So with Firefox, and only if you install that add-on first, you can use the FF.au3 UDF.

:graduated:

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

Hello Theorem,

Window Info Tool is for snooping in application windows which in case of browsers, it will detect elements of the browser itself. For Web Pages, your best bet is looking at the source. the official AutoIt download comes with a handy UDF called IE.au3. It is well documented in the Help File that also comes with the official AutoIt download. With that in mind you may want to look at:

_IEFormGetCollection()

_IEFormGetObjByName()

Also you mentioned Chrome. Which has some great snooping tools as well. IF you right click on an element you wish to get information on, and select option 'Inspect Element', You will get the elements specific information. and at the bottom of the browser, you will see some square/rectangle tabs that will allow you to also view the table or form that it is attached to. After you find the information you need. You can use one of the examples in _IEFormElementSetValue() to set username and password elements to submit a form.

Good Luck, and if you have further questions, feel free to post here again

Realm

My Contributions: Unix Timestamp: Calculate Unix time, or seconds since Epoch, accounting for your local timezone and daylight savings time. RegEdit Jumper: A Small & Simple interface based on Yashied's Reg Jumper Function, for searching Hives in your registry. 

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