sean_n wrote:
> Here's an example of using autoit inside of ruby.
> 
> require 'win32ole'
> autoit = WIN32OLE.new("AutoItX3.Control")
> autoit.WinActivate('Yahoo!')
> 
> So if this works, how come this doesn't work?
> 
> require 'win32ole'
> autoit = WIN32OLE.new("AutoItX3.Control")
> obj=autoit.ObjGet('','InternetExplorer.Application')
> 
> How do I call the ObjGet() function?  In other words, what COM object
> contains that method?

I can't offer much help with regard to AutoIt, but you can connect to an 
existing instance of IE using win32ole and the Shell object's Windows 
collection:

ie = nil
for window in WIN32OLE.new('Shell.Application').Windows
  begin
    if window.Document.Title =~ /Yahoo/
    ie = window
  end
  rescue
  end
end

Further details here:

http://rubyonwindows.blogspot.com/2007/05/shell-windows-collection-of-internet.html

Hope that helps!

David

http://rubyonwindows.blogspot.com
-- 
Posted via http://www.ruby-forum.com/.