G. Creating Your Own Scriptable Objects

Why Create Your Own Objects?

Several chapters have been devoted to discussing just a few of the scriptable objects provided with Windows. In this appendix, I show you how to create objects of your own.

Why would you want to do this? Well, remember what objects are about: They do a particular job while hiding the details of how the job is actually accomplished. Using this “divide-and-conquer” approach has three advantages:

• Faster development and debugging

• Simplification of the scripts and programs using objects

• Code reusability

Let’s look at these advantages one by one. First, when creating a new object, your immediate task is to make sure that the object does what it is supposed to do and that its ...

Get Windows 7 and Vista Guide to Scripting, Automation, and Command Line Tools now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.