Close Server: KOPWWW05 | Not logged in

Welcome to Health Care POV | sign in | join
Stepwise Success

AutoIt Your LIS

Published August 19, 2016 2:28 PM by Scott Warner

For those of you who like to tinker with programs, who remember typing BASIC programs from magazines in the early Eighties, and a few of you who understand programming, AutoIt will be fun. For the rest of you, it won’t be nearly as difficult as you might think.

The benefits are enormous: speed and accuracy. A computer does exactly what you tell it to do, and telling it doesn’t get much simpler than AutoIt. The site describes it as “a freeware BASIC-like scripting language designed for automating the Windows GUI and general scripting.” But what does that mean?

  • BASIC (Beginner’s All-Purpose Symbolic Instruction Code) refers to a family of text-based, interpreted languages. An interpreter program translates the instructions into code your computer understands. AutoIt works in a very similar fashion. The idea of this kind of “high level” language is that you can write commands in easy-to-understand language and let the computer do all the grunt work. Simple!
  • The Windows GUI (Graphical User Interface) refers to everything that is common to Windows programs: the name of the window, button, text box, or other control element.
  • General scripting refers to sending keystrokes and mouse clicks as though a human operator has done so.

Before I continue, I’ll add that AutoIt is one of several. AutoHotKey is a competitor. I prefer AutoIt, but I have a programmer background and appreciate what it does. These and other programs are available and well-documented for those with the interest and patience.

First things first: you download AutoIt.

Next things next: you write a simple Autoit script. This can be done with Notepad, although the installation includes an editor. The command to send keystrokes to an application is called Send(string). A string in programming is a variable ($i, $value, etc.) or constant (“Monday”) that is enclosed in quotes.

The Send command simulates keystrokes exactly as though you typed them on a keyboard. And what about the non-alphabetical keys, such as shift, spacebar, and enter? AutoIt uses “macros” that are predefined to simulate these. Thus the command Send(“{DOWN}{DOWN}Hello{ENTER}”) sends two down arrow strokes, types the word “Hello,” and hits the enter key. AutoIt has a full range of macros that include date and time.

You might be curious why string is in parentheses. All commands are “functions.” Think of a function as a task. Send() is a built-in function that mimics keystrokes, but you can easily write your own. These used to be called “subroutines” in BASIC; the difference here is that functions are portable. A function is like a little program inside your program. If you write a function for one script it will also work in another. Thus the more scripts you write, the less time it will take. It’s even possible to create “libraries” of functions. But you do NOT need to write functions to create a script that saves you time.

Using AutoIt you can automate reports, searches, item master creation, and even make global changes to fields in your LIS. There’s a learning curve involved, but it can save hundreds of valuable tech hours. More to the point, a script doesn’t make mistakes; it does what it’s told. Writing a script to save payroll hours makes good sense. Indeed, your LIS vendors do exactly that for the same reason.

Next, I’ll show a simple example and describe how it works.

NEXT: A Script Example

posted by Scott Warner


leave a comment

To prevent comment spam, please type the code you see below into the code field before submitting your comment. If you cannot read the numbers in the image, reload the page to generate a new one.

Enter the security code below:


About this Blog

    Scott Warner, MLT(ASCP)
    Occupation: Laboratory Manager
    Setting: Critical Access Hospital
  • About Blog and Author

Keep Me Updated

Recent Posts