hey basu, did you ever figure out this issue? I'm trying to do essentially the same thing (work with an embedded IE control). I found the function __IEControlGetObjFromHWND from the IE.au3 Of course, this is not built into the binary for autoit so I can't use that. It looks (kind of) like you tried to implement that in ruby. Unfortunately its pretty complicated for a OLE/COM newbie like me. It seems like there should be an easier way though but I have yet to come up with anything. Let me know if you've figured it out.
On Mar 2, 1:13 am, basu <bas.go...@gmail.com> wrote: > i tried getting the automation object of the embedded browser but no > success, i not able to figure out the issue, could some give inputs on > this please ? > (There is an function defined in IE.au3 (autoitv3 UDF) to get the IE > object from the IE handle, i tried re writting the same function in > ruby) > > Code tried .. > > # Start winamp player > ....... > > require 'Win32API' > SMTO_ABORTIFHUNG = 0x0002 > Win32API.new("ole32", "CoInitialize", ['P'] , 'I').call(0) > > reg_msg = Win32API.new("user32", "RegisterWindowMessage", ['P'] , > 'I').call("WM_HTML_GETOBJECT") > puts reg_msg > > # "Main Window" is title of winamp player > # "Internet Explorer_Server1" is a IE control embedded in the player > hnd = @@autoit.ControlGetHandle("Main Window", "", "Internet > Explorer_Server1") > puts hnd > > result=" "*16 > > aInt = [0xA7, 0x31, 0x0, 0xA0, 0xC9, 0x8, 0x26, 0x37].pack 'I*' > a = [0x626FC520, 0xA41E, 0x11CF, aInt].pack 'IIIP' > > sendMessagetimeout = Win32API.new("user32", "SendMessageTimeout", > ['L','I','I','I','I','I','P'] , 'L') > sendMessagetimeout.call(hnd.hex, reg_msg, 0, 0, SMTO_ABORTIFHUNG, > 1000, result) > puts result.unpack("L") > > idisp=0 > oIE = Win32API.new("oleacc", "ObjectFromLresult", ['P', 'P','I','P'] , > 'L') > oIE.call(result, a, 0, idisp) > > # returning zero > puts idisp.unpack("L") > > Thanks in advance ! > > On Feb 24, 10:40 am, basu <bas.go...@gmail.com> wrote: > > > I want to know whether the attach() method supports access to the > > browser embedded in a windows applications (Ex: Internet > > Explorer_Server1 control embedded in the winamp player) , if not could > > some one provide me the inputs on how to achieve this > > Thanks,Basu --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~----------~----~----~----~------~----~------~--~---