my $title = Win32::GUI::Text(Win32::GUI::GetForegroundWindow()) or warn("No title\n");