Anukul Singhal wrote:
> Hi,
> 
> I am using AutoIt in my ruby code to automate a client
> application.Although most of the AutoIt methods are working fine, I am
> not able to use the HWnd function of AutoIt, getting a method missing
> error. Would like to know if there is anything wrong in the code below:
> 
> require 'win32ole'
> 
> autoIt = WIN32OLE.new("AutoItX3.Control")
> bb = IO.popen("C:/Windows/Notepad.exe")
> sleep 3.0
> appID = autoIt.WinGetHandle("Untitled -Notepad")
> sAppID = appID.to_s
> appHandle = autoIt.HWnd(sAppID)
> puts appHandle

When this line is inserted:

  puts autoIt.ole_methods

it shows there is no method Hwnd.

AFAIK WinGetHandle is already giving you what you want. If you need the 
handle from a control (f.i. a button or label) , use ControlGetHandle.

hth,

Siep
-- 
Posted via http://www.ruby-forum.com/.