Jump to content

Recommended Posts

Posted (edited)

I'm just asking here in case somebody has experience with the IE9 COM. For some reason, I can't do certain things (such as the .click() or .focus() methods on any elements), and I couldn't find any information about what might be stopping me from doing so. Here's a quick example that shows what I mean.

#include <IE.au3>
$oIE = _IECreate("http://www.google.ca/")
_IELoadWait($oIE)
local $t = _IEGetObjByName($oIE,"q")
;This works, properties seem to work fine.
$t.value = "Test 1"
;This also works, so it isn't a problem with methods.
$t.insertAdjacentText("afterBegin","Test 2")
$t = _IEGetObjByName($oIE,"btnG")
;This does nothing.
$t.click()

I've also tried it without IE.au3 functions, just using normal COM syntax according to documentation on the MSDN library, no luck. I've also tried it with LuaCOM, so I don't think it's a problem with AutoIT, but with IE9.

Edited by Syrin
Posted

Ugh. I can do it manually - I have a version set up that just uses the MouseClick() AutoIt function... I just prefer elegant solutions to hamfisted hackeries. Oh well. If it works, it works, I guess.

Posted

Yeah... a google for "IE9 COM" doesn't help so much. Oh well, the deadline is upon me, so I just have to leave it running using MouseClick instead. Thanks for the help.

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
  • Recently Browsing   0 members

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