Harvey Hahn
Arlington Heights Memorial Library
Another really good session. Lot’s of detailed work here. Grab Harvey’s presentation materials.
Script imitates what a person would perform. The script performs a series of Windows actions that often involve entering, modifying, or deleting data.
Dumb scripting cannot respond to what appears on the screen.
Smart scripting can read the data on the screen and can react to screen behavior "intelligently".
Scripting considerations
A script can send keystrokes faster than Windows can process them
Programmers need to insert delays after Send commands to permit Windows to catch up
The delay value should be at least 2/10ths of a second
Millennium scripting tip
If there is a keyboard shortcut available, USE IT before trying mouse clicks. Keyboard shortcuts are the easiest and most reliable.
A script must wait until a given window is ready for action.
It might also need to check for the possible appearance of an optional window.
Watch out for surprise windows with error messages.
If you can highlight it you can read it. If you can’t highlight it, you cannot.
The standard way of getting data off the screen is by highlighting it and copying it.
It’s standard practice to clear the clipboard before copying any data to it.