Scripts are lightweight coding languages used by to extent HTML and various other technologies such as MS Word. Scripts have many applications in Help development, from providing additional user assistance in your Help files to simplifying Help development and maintenance.
Which language you can use to create a script depends on the environment in which the script is to run. Some of the more common script languages used by Help developers are listed below.
- Visual Basic for Applications (VBA) : Like VBScript, VBA is based on Microsoft's Visual Basic, but it only runs inside applications that support it. Microsoft Office 97 and later use VBA as their macro language. It allows programmatic access to most areas of the application, and can even be used to programmatically communicate between applications. Like Windows Script Host, VBA also allows access to files and the general Windows environment. : Help authors who use Microsoft Word either by itself or in conjunction with a Help Authoring tool can automate many authoring tasks using VBA. Its comprehensiveness makes the possibilities virtually limitless.
- WinHelp Macros : The WinHelp macro set is a small collection of functions and commands that are specific to WinHelp files.
- WordBasic : WordBasic was the Microsoft Word macro language for Word 95 and earlier. Although just as powerful as VBA in most respects, it only runs in Microsoft Word.
Scripting In Help Files
Most script you write in uncompressed HTML will usually work equally well in compressed help files such as HTML Help (.CHM). You may need to add the script file to the [FILES] section of your .HHP project file to make sure it gets included in the .CHM file at compile time.