Re: HTTP transfer errors



On 17/06/2011 02:02, Don Y wrote:
Hi George,

On 6/16/2011 2:26 PM, George Neuner wrote:
On Wed, 15 Jun 2011 13:27:07 -0700, Don Y<nowhere@xxxxxxxx> wrote:

E.g., can I take *any* GUI application that runs under Windows
and "drive it" from a command line (within reason)?

No and yes. A program must be designed deliberately for command line
use. WIndows programs normally do not use the command line or
environment variables (other than PATH) for much of anything.

However Windows scripting (WSH) or Powershell can send menu and mouse
clicks to any program - and also can directly drive programs that are
designed for automation with OLE, COM, etc. - so it is technically
possible to create a command line "driver" for any program.

OK. But, there is no common, preexisting mechanism by which one
can drive any arbitrary program?


No, there is no common mechanism.

Things like Powershell or macro (mouse and keyboard) recorders can help a bit, but they are not reliable for most programs. If a program can be controlled well by a keyboard, then it's probably a good candidate for a macro recorder. But there are still all sorts of issues that get in the way. Pop-up windows can be a pain as they move around, and unexpected message boxes ("There's an update available!") will ruin your macro script.

And, presumably, every program that is *designed* with "automation"
in mind, defines its own interface? I.e., the verbs that it
exports need not correspond with the actions available on the
menus, accelerators, etc.?

NB: Powershell requires .NET. WSH requires a service be installed on
some platforms.


Power-shell also likes-to use-hyphens every-where. It's nice to see that MS has finally realised that command-line control is an important tool for administrators, but they'd have been better off making a few useful windows-specific command line utilities and shipping MSys with Windows.
.