From: Anukul Singhal Date: 2008-07-13T14:48:01+09:00 Subject: Re: AutoIt: HWnd function of AutoIt giving method missing error Hi, Thanks so much. It worked great! Just want to know if you have the url or any reference where you got these undocumented features from? Thanks, Anukul Siep Korteling wrote: > Anukul Singhal wrote: >> Hi Siep, >> >> Thanks a lot for the reply. You are right that WinGetHandle or >> ControlGetHandle should do the trick for me. But my requirement is to >> use one of these handles to set text or do the click operation. What I >> want to do is this: >> >> appID = autoIt.WinGetHandle("Untitled -Notepad") >> autoIt.ControlSetText(appID,"","Edit1","This is a text") >> >> I want to use title argument only once to fetch the window handle and >> then subsequently use the window handle to perform other actions of >> setting text or click. Is it possible to avoid 'title' argument and use >> a Window Handle instead? >> My concern is that if there are more than 1 instance of say "Notepad", >> the title of all the instances of notepad would be the same but the >> Window Handle would be unique for each instance, and hence would be a >> good option to use for performing actions. >> >> Is there any way out to do the above step and avoid "title" as the first >> argument? >> > > Found an undocumented feature. This is a way to use the handle: > > res=autoIt.ControlSend("[HANDLE:#{appID}]","","Edit1","some text") > sleep 2 > autoIt.Winclose("[HANDLE:#{appID}]") > > hth, > > Siep -- Posted via http://www.ruby-forum.com/.