Syrin Posted March 30, 2011 Share Posted March 30, 2011 (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 March 30, 2011 by Syrin Link to comment Share on other sites More sharing options...
Richard Robertson Posted March 30, 2011 Share Posted March 30, 2011 I'm sure you need some kind of security clearance. Microsoft knows that automating IE can produce dangerous results. Link to comment Share on other sites More sharing options...
Syrin Posted March 30, 2011 Author Share Posted March 30, 2011 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. Link to comment Share on other sites More sharing options...
Richard Robertson Posted March 30, 2011 Share Posted March 30, 2011 Have you tried running your script as administrator to see if it works that way? Link to comment Share on other sites More sharing options...
Syrin Posted March 30, 2011 Author Share Posted March 30, 2011 I have, it was one of the first things I tried. No dice. Link to comment Share on other sites More sharing options...
Richard Robertson Posted March 31, 2011 Share Posted March 31, 2011 Do you have a prerelease copy of IE9? I could see that causing problems I guess. Link to comment Share on other sites More sharing options...
Syrin Posted March 31, 2011 Author Share Posted March 31, 2011 Nope, I only just downloaded it a couple days ago. Should be release version. Link to comment Share on other sites More sharing options...
Richard Robertson Posted March 31, 2011 Share Posted March 31, 2011 I'm remembering someone encountering this but searching for IE9 COM isn't returning significant documents. Unfortunately COM is a top level domain. Link to comment Share on other sites More sharing options...
Syrin Posted March 31, 2011 Author Share Posted March 31, 2011 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. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now