use Win32::GUI; use Win32::API; use constant WM_COPYDATA => 74; my $rushhandle = Win32::GUI::FindWindow("tfmrush", ""); my $command = "RushApp.FTP.Login('backup','',0);"; my $copy_data_struct = pack('L2P', 1000, length( $command ), $command); print Win32::GUI::SendMessage($rushhandle, WM_COPYDATA, 0, $copy_data_struct);