use Win32::GuiTest qw(FindWindowLike GetWindowText SetForegroundWindow SendKeys SendMouse MouseMoveAbsPix GetDesktopWindow); my $rhapsodyHandle = GetWindow("rhapsody"); my $windowText = GetWindowText($rhapsodyHandle); print $windowText . "\n"; sub GetWindow{ my($windowName) = @_; my @windows = FindWindowLike(0, "^$windowName", ""); my $matchingWindow; for (@windows) { if($_){ $matchingWindow = $_; } } return $matchingWindow; }