Type libraries Visual Basic has to know about the type and properties of the objects that are used in the project. If this information is missing, then Visual Basic will not provide code. As a result, you will receive error mes- sages that will notify you of unknown objects and types when the script is executed. Information about objects and types is provided in type libraries. The type library that provides the Canvas scripting functionality is called Canvas.tlb. It is installed in your Canvas 8 folder. The Downsam- ple script also uses objects from another type library that provides file system operations such as opening files and accessing folders. This type library is called Microsoft Scripting Runtime. Loading the two type libraries Choose References from the Project menu to access the two type libraries. In the pop-up dialog, scroll down to the Canvas 1.0 Type Library entry and place a check mark next to it. Do the same for the Microsoft Scripting Runtime entry. Once a type library is loaded, it can be viewed with the Visual Basic Object Browser. Choose Object Browser from the View menu to activate it. In the list box at the top, you can choose which library you want to view. Select Canvas and make yourself familiar with its func- tionality. Sample script done in Visual Basic. This script automatically converts all of the im- ages in a selected file from their present resolution to 72 dpi.
Canvas 8 Help: Writing Scripts for Canvas (6 of 16)                                                 Page #748