On 12 Feb 2002 at 9:04, Robert Mecklenburg wrote: 

> First, please excuse the newbie question.  I don't think this is
> off-topic, but my judgement isn't the one that counts. ;-) I've done a
> good bit of searching with google, faqs, and posting to
> comp.lang.perl.misc, but can't figure this out...
> 
> I'm using the most recent cygwin port of perl (revision 5.0 version 6
> subversion 1) on windows 2000.  I want to send "alt+f x" to an Outlook
> Express window from a perl script.  It seems that ActiveState Perl can
> do this with the Win32::Setupsup package, but that the vanilla perl
> (or cygwin's perl) cannot do this?

I am pretty sure they cannot; why would they? Perl doesn't come from Windoze; it comes 
from UNI*. 
Anything that Perl has been "taught" about running on Windows and manipulating 'doze 
features, has 
happened relatively recently (relative to Perl's origin point). And a great deal of 
that added 'doze 
functionality has been added by workers for ActiveState or rolled into the ActiveState 
releases tho 
originating earlier in someone's work (G. Sarathy for ex.). Credit where credit is 
due. 

> I tried to install the Win32-CtrlGUI-0.22 package from cpan.org but it
> requires Win32::Setupsup which is not on cpan.org.  I found this
> package on perlring.org but it seems to require ppm.  I found
> references to ppm at activestate.com but it appears to be a feature of
> ActivePerl rather than of "just perl".

Yes, ppm is an invention of the folks at ActiveState, specifically I think the major 
parts have been 
created by Murray Nesbitt. Look for ppm on CPAN. ppm is now distributed for everyone 
to use 
however they will (as a general- purpose utility; they envision it being used well 
beyond only for 
installation of Perl extentions). You can surely get ppm working on cygwin Perl with a 
bit of effort; it 
just isn't built-in like it is for AP. ALSO, please check the ppm file for 
"Win32::Setupsup" which 
might just be a gzipped-tarball inside a .zip file, with (maybe) a .ppd file and 
stuff? outside the tarball. 
Maybe not, too. But many ppm files are just an outer wrapper around a standard CPAN 
dist package, 
TTBOMK. If this is the case, you are in luck and you might just be able to build it by 
hand -- using the 
standard perl module building incantations of course. Specific instructions concerning 
which, BTW, 
would getting quite OT for this List, should they be brought up... 

> So the question is: "how to I send keystrokes to a Windows window with
> cygwin Perl"?

Absolutely likely you do not want to fruitlessly boogey with futility unless you 
happen to already be 
an accomplished Win32 programmer (and are ready to brave xs or learn 'Inline.pm'). You 
probably 
want to use the means that the existing Win32 C extentions to Perl (such as those 
packaged with 
ActivePerl) can provide. Look, cygwin Perl is not magical; it does not automatically 
have parallels to 
all the extra Win32 stuff that ActiveState has put into their product. It is what it 
is: an 'orthodox', 
useful, solid UNI*-ish *core* perl packaging. It's not a 'competitor' with AP + all 
the extensions that 
are commonly and conveniently installed with/to AP, and comparing the two is making an 
apples-and-
oranges mistake. 

Generically, two of the mechanisms Windows provides for interapp communication are OLE 
and the 
ancient DDE message protocol. If you are truly feeling creative and adventurous you 
might start 
there. But I have a feeling you will probably find you need to bite the bullet in the 
end, install 
ActivePerl and port your script to ActivePerl --  if you cannot get the necessary 
module support 
installed through Cygwin Perl, which you may well not be able to. Unless you are low 
of disk space or 
something, it isn't so bad. Installing AP will only take you a few minutes and after 
all its a good tool to 
have on hand sometimes. I run both; so do many others, I think. One thing that will do 
for you is 
motivate your programmer discipline in that you'll perforce become oriented towards 
writing very 
portable scripts that don't lazily over-rely on UNI*-POSIX'isms nor on Win32-isms. Not 
that there 
aren't specific occasions when your goal is to do something very platform-specific and 
so non-
portability cannot be avoided. 

HTH,     Soren Andersen 


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Reply via email to