Zohar Posted January 25, 2009 Share Posted January 25, 2009 (edited) If I Open IE, navigate to some site by myself(manually), and then run this Code: $oIE =_IEAttach("SomeURL...","url") The attach operations Succeeds, but when I try after that to do WinFlash($oIE) Or WinActivate($oIE) Both those functions, work on the Calling window(SciTE for example), and not on the IE window that I have just attached to. that's despite the fact that whatever other operation I will do with $oIE, will succeed and work very well, for example _IENavigate($oIE,$URL) will navigate with no problem. just window operations like Activate or Flash don't work on the right window. how can I fix this? Edited March 2, 2009 by Zohar Link to comment Share on other sites More sharing options...
Authenticity Posted January 25, 2009 Share Posted January 25, 2009 The problem is that you're trying to send object instance to functions that require titles or texts. Link to comment Share on other sites More sharing options...
monoceres Posted January 25, 2009 Share Posted January 25, 2009 As the above poster mentioned you cannot use the ie object as a parameter in Win* functions. Use _IEPropertyGet to get the hwnd of the ie window instead. Example: #include <ie.au3> $ie=_IEAttach("http://www.google.se/","url") WinFlash(_IEPropertyGet($ie,"hwnd")) Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
Zohar Posted January 26, 2009 Author Share Posted January 26, 2009 To Authenticity:All AutoIt's Win* functions that accept a window Title, also accept an hWnd pointer.To monoceres:You were right!!!I added the _IEPropertyGet($oIE,"hwnd") part, as you said, and it solved it!!!Thank you very much! I always thought that because $oIE is a "window" object, then executing Widnow functions on it should work.I'm glad it now works 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