Читать книгу Beginning Programming All-in-One For Dummies - Wallace Wang - Страница 73

Automating a program

Оглавление

At the simplest level, scripting languages (also called macro languages) can automate repetitive tasks that essentially record your keystrokes so you can play them back at a later time. For example, if you regularly type the term Campylobacteriosis (a disease caused by the Campylobacter bacteria), you have two choices:

 Type the term manually, and hope that you spell it correctly each time.

 Type the term just once (the easier solution), record your keystrokes, and use those captured keystrokes to create a scripting language program that you can save and run in the future.

Figure 3-6 shows a scripting language, Visual Basic for Applications (VBA), that has captured keystrokes and saved them in a VBA scripting language program.


FIGURE 3-6: Recording keystrokes automatically creates the equivalent VBA code in Microsoft Word.

Beginning Programming All-in-One For Dummies

Подняться наверх