in reply to Perl+MSWord (via Win32::OLE) events handling
Does anyone knows a way how to send to my program any type of signal in my case?mean that you want to send a message to Word, that gets processed by the message loop in your perl program?
This should close Word and generate a "Quit" event.#!/usr/bin/perl -w use Win32::API; my $find = new Win32::API("user32", "FindWindowA", 'PN', 'N') or die "No find"; my $send = new Win32::API("user32", "SendMessageA", 'NNNN', 'N') or die "No send"; # Find any Word window my $wordhandle=$find->Call("OpusApp",0); print "Handle: ",$wordhandle,"\n"; $send->Call($wordhandle, 0x0010, 1, 0) if ($wordhandle);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Perl+MSWord (via Win32::OLE) events handling
by Courage (Parson) on Sep 26, 2002 at 14:55 UTC |