Anukul Singhal wrote:
> Hi,
> 
> After invoking notepad through ruby, I wanted to know if I could type
> some text in that notepad (which was just invoked using `notepad`) and
> save it using a ruby code.
> 
> Can anyone please help me with the ruby code in this regard?
> 

Look into a free tool called AutoItX.  It is a COM and DLL thing that 
you can script to drive Win32 applications.

You can use Ruby's Win32OLE lib to load the COM object, then control it 
using Ruby code instead of the AutoIt scripting language.



-- 
James Britt

"In physics the truth is rarely perfectly clear, and that is certainly
  universally the case in human affairs. Hence, what is not surrounded by
  uncertainty cannot be the truth."
  - R. Feynman