Win32\'s FindWindow() can find a window having the title of \"Untitled - Notepad\", but what if I just want to find a Notepad window but don\'t know whether it
You almost certainly want to use the EnumWindows function; this function will call you back with a window handle, and then you can use GetWindowText to inspect the window title and find the one you want.
Now, I have no idea how to write a callback function in Ruby, so you'll need some help there.