Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Favorite Windows Automation Book/Tutorial

by Anonymous Monk
on Dec 31, 2007 at 17:53 UTC ( [id://659780]=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I've been successfully using Perl with Unix for many years now, and my latest job is now working on/with MS Windows machines (XP/Server 2003). So I'm looking for a good book or tutorial on how to effectively use Perl on Windows machines, especially for OLE/COM/Automation tasks (or what ever the terminology is for scripting GUI applications). I guess I'm probably looking for more of a Windows Programming book that shows how to use Perl to get things done. The only books I've come across so far which might potentially meet my needs are: ...I was wondering what the monks thought of these titles, and if they had ideas for other or better volumes.

Replies are listed 'Best First'.
Re: Favorite Windows Automation Book/Tutorial
by Corion (Patriarch) on Dec 31, 2007 at 18:01 UTC

    Usually, the manuals of the applications come aplenty with sample code in Visual Basic. Converting the code from Visual Basic to Perl is a mostly mechanic task and hence I never found the need to read tutorials for automating Windows stuff beyond reading the manuals or the help files that come with the target applications.

    If you are lucky and your target application includes a macro recorder that records into a Visual Basic program, you can even skip the "read the manual" part of finding out what functions to call and simply record the actions you want and then translate the generated Visual Basic code to Perl. Thanks to OLE, you can remotely use the exposed APIs of the applications, and at least Microsoft is very good at exposing good APIs for Microsoft Office. With the exception of Outlook.

    If you're unlucky and your target application does not expose an OLE API, then you will have to use Win32::GuiTest to send (preferrably) keystrokes, window messages or mouse clicks (fragile) to the target application to automate it.

    If you're looking into accessing the Windows API, there is only one resource I can recommend, the Microsoft Developer Network (MSDN), which has the (current) Windows API online.

Re: Favorite Windows Automation Book/Tutorial
by Errto (Vicar) on Dec 31, 2007 at 19:25 UTC
Re: Favorite Windows Automation Book/Tutorial
by gwhite (Friar) on Dec 31, 2007 at 22:41 UTC

    I have the latter of those books and it is a solid text. It has a few handy utilities and some very good examples that I was able to hack up to my liking. The Roth website (author of the latter book) has lot of good information as well. He also has another book: Perl Scripting: The Administrator's Handbook that I would give similar comments about, not omg you gotta have it, but if you have the book, it is money well spent.

    g_White

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://659780]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (5)
As of 2024-03-19 08:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found