Kevin Carhart
Scripting and Automation Expert (415)
225-5306
|
 |
 |
 |
 |
For the past ten years, I have been helping companies get their work done more efficiently with front-end
automation and scripting. I can help you script your OS, web browser or third-party application to tackle tasks
that would otherwise be out of reach.
|






|
 |
 |
 | |
 |
 |
 |
 |
 |
Check out the following true stories of the ways in which scripting has helped my past clients and employers.
|






|
 |
 |
 | |
 |
1. At a multimedia software company in San Francisco
 |
 |
 |
 |






|
We write and sell online training courses, and for some of our oldest courses, the source is too outdated to be of
use. We can access the course in compiled form only. Now we would like to reuse the course content in an
update, but we need to extract the content somehow. Retyping would take forever and introduce new errors.
Copy and paste isn't supported. Is there any other way we can extract the content?
|
 |
 |
 |
 | |
 |
 |
 |
 |
Yes. We can use Microsoft Active Accessibility (MSAA) to reliably get at the text fields, buttons and other GUI
elements in most PC applications. We can pull out the text from a given screen, and store it for later use. We
can usually use MSAA even when the clipboard is not supported.
|






|
 |
 |
 | |
 |
2. At a consulting company in San Francisco
 |
 |
 |
 |






|
We have hired a vendor to host a questionnaire for us on a website. Once our users have filled out the
questionnaire, we can log in and retrieve the completed questionnaires as PDFs.
|
 |
 |
 |
 | |
 |
 |
 |
 |






|
The vendor's interface is clunky and inconvenient. We have to press a button to generate one PDF, then wait
about a minute for it to come up on screen, save it and start over. They don't give us a batch mode! So I'm
stuck at my desk waiting, wasting lots of time I could be spending on something else. Can you write me
something that will help?
|
 |
 |
 |
 | |
 |
 |
 |
 |
Yes! Internet Explorer is scriptable, which means we can write a program to bring up a given web page,
automatically fill out fields and click the necessary buttons and links to download PDFs as a batch, one after the
next. We will parse the HTML on a page as necessary, to figure out what's what and how to manipulate it.
|






|
 |
 |
 | |
 |
 |
 |
 |
 |






|
Parsing and scraping? That's a rather old technology. What happens if our vendor does an overhaul of their site
design? Couldn't we use XML?
|
 |
 |
 |
 | |
 |
 |
 |
 |
Scrapers are a technology of last resort. But we don't hold all the cards. XML is a lovely way to separate the
content of a web page from its layout, but it doesn't do us any good if the vendor doesn't happen to provide XML
in the first place.
|






|
 |
 |
 | |
 |
 |
 |
 |
 |
If they don't overhaul their layout for a year, you'll have a good ad hoc solution from now until then.
|






|
 |
 |
 | |
 |
3. At a hardware company in San Jose
 |
 |
 |
 |






|
Every day, engineers in my company create database records for new parts, using a web application. After they
are reviewed, they need to be entered into our legacy ERP system too. The way we accomplish this gives me a
headache: we print them back out on to paper, and my employee enters them back in to the ERP client software.
I sure would like to eliminate that double entry. The data is already in digital form, and it's such a waste to print
it back out and start over.
|
 |
 |
 |
 | |
 |
 |
 |
 |






|
What I'd most like to do is use a SQL INSERT, and write to each and every table that the ERP client software
writes to. But the documentation on the tables is terrible, and we can't get a straight answer out of them when
we call for support. I don't want to risk skipping a table and ending up with corrupt data. Can front-end
automation help?
|
 |
 |
 |
 | |
 |
 |
 |
 |
Probably, but first of all, have you considered switching to a different ERP system? The one you are using now
sounds rather old and idiosyncratic.
|






|
 |
 |
 | |
 |
 |
 |
 |
 |






|
Sure, we've been thinking about it. We've even had some reps in to give us presentations. As a company, we're
considering whether we want to spend the money. It's going to be at least a year before we decide, and I'd like
a solution I can use in the meantime.
|
 |
 |
 |
 | |
 |
 |
 |
 |
We can script the ERP client software using either MSAA or a third-party scripting program such as Winductor or
Flute. We can post mouse clicks and key presses to fill out all the appropriate fields using the data that you
already have in digital form. We will submit each record through the client application, just like your data entry
person would, which means you can rest assured that you haven't missed a table.
|






|
 |
 |
 | |
 |
 |
 |
 |
 |
If you have a lot of records to enter, just set aside a dedicated "workhorse" PC and start the script when you go
home for the evening. It will probably be done the following morning.
|






|
 |
 |
 | |
 |
 |
 |
 |
 |






|
But there are a lot of conditional screens and popups that only appear in the ERP client now and then, under
certain circumstances. It sounds messy and complicated to try to anticipate all those possibilities.
|
 |
 |
 |
 | |
 |
 |
 |
 |
We can isolate the simple situations from the unusual ones, and use scripting to handle just the bulk of the simple
ones. The script can skip elaborate or unusual records, and create a log that tells which ones were done and
which ones weren't.
|






|
 |
 |
 | |
 |
 |
 |
 |
 |
The scripting technologies described above are known by a variety of overlapping names and acronyms. I have a decade of expertise helping companies get their work done more efficiently using all of the following: WSH, VBA,
API calls, MSAA, scripting the IE object, Winductor, Flute, Expect, Expect.pm, WWW::Mechanize, front-end scripting, black box scripting,
macros, scrapers, scripting the OS, scripting a third-party application and scripting a web browser.
|






|
 |
 |
 | |
 |
 |
 |
 |


 |
| |
Kevin Carhart
Scripting and Automation Expert (415)
225-5306
| |








|
 |
 |
 | |
 |
|