Bunch of questions here.
I googled API(I have no idea what it is, I just heard that it stands for application interface)..
An API in general is whatever interface the program provides so that it can be "controlled" by another program (instead of a user). Some APIs are in the form of a library of functions, others may provide some kind of network interface/protocol for instance. Many programs don't have an API at all; they just rely on button/keyboard clicks or mouse movement.
Is that the right way to approach something like that if one was interested in writing something to interace w/ 3rd party software
Is perl right software to do that sort of work?
If your target program has a public API, then it's usually the most reliable and easiest way to control it. Perl's pretty good at doing that kind of thing, but the devil is as always in the details.
How does one find out what the capability of that 3rd party software and how to interface that?(I am thinking API)
Search the web. Especially the site of the manufacturer. You may need to pay for this information. An API is controlled by the target program(mer), so the info on the API is controlled by whoever controls the program. Unless you're content to rely on hacks that might break at the next update.
| [reply] |
To add to Joost's comments: An Application Program Interface (API) is supplied by the 3rd party and should be documented with the product. Many APIs are designed to be driven from C, being a fairly portable, generic, and widely known language. We can create a Perl interface by writing a variety of C code (known as XS) between Perl and the 3rd-party product. This code will use the API of the product and also the Perl API, see perlapi.
Once the code is written (if in a language like C) then the 3rd-party Run-time libraries are linked with the program. This means that you must have those libraries in order to build it, and that might mean buying a license.
Some examples: Windows has a C API, known as Win32. UNIX also has a C API, documented in UNIX man pages (section 2). Microsoft Office, on the other hand, only has the OLE API, it does not have a C procedural interface (which is a real pain). Most commercial database products have C APIs, and indirectly this enables interaces to languages like PHP, Python, and good ole' Perl. | [reply] |