use Win32::GUI; use Win32::API; my $rushhandle = Win32::GUI::FindWindow("tfmrush", ""); $command="RushApp.Util.Standalone.Login('backup','','')"; my $copy_data_struct = pack( 'L2P', 2, length( $command ), $command ); #Win32::GUI::PostMessage($rushhandle,WM_COPYDATA,$wparm,$lpCopydatastruct); #my $SendMessage=new Win32::API("User32","SendMessage",[qw(N N N N)],'N'); #my $lresult=$SendMessage->Call($rushhandle,WM_COPYDATA,$wparm,$lpCopydatastruct); Win32::GUI::SendMessage($rushhandle, WM_COPYDATA, 0, $copy_data_struct);