#!perl use strict; use warnings; use Win32::GuiTest qw(FindWindowLike SetForegroundWindow); my $hWnd = (FindWindowLike (0,qr/My FoxPro Application/))[0] ; die "No window found\n" unless $hWnd; SetForegroundWindow ($hWnd); PushChildButton( $hWnd, "PushMe!" );