In Step 1 we looked at Step 1 of the Windows Script Wizard. In this part we'll examine the remaining five steps.
Once you've entered the registration information, hit next to continue to Step 2. In Step 2 you need to enter some high-level information about the component. For this component, choose to use VBScript. For components that will be used as COM components in an ASP page, select the "Support Active Server Pages" choice. This will allow the COM component to access the ASP intrinsic objects such as Response, Request, etc. Finally you must decide if you want to allow for interactive Debugging or Error checking. These are options that should be selected when developing a component.
The Error checking option, if selected, displays an alert box on the Web server when an error occurs in the component. When this is selected, if an error occurs in the component, it will not be shown in the browser, but rather on the Web server's desktop. The Debugging option, if selected, allows the Microsoft Script Debugger to be run in the event of an error. These two options should be selected when developing a component; however, when your component is going live and will be used by others not developing from the Web server, these should be turned off.
Step 3 of the wizard prompts for properties for the component. You can enter all of the component's properties here, whether they are read/write, read-only, or write-only, and what their default values are. Since our example component has no properties, simply hit next on this Step, leaving the property listing blank.
Step 4 prompts for a list of the component's methods and their parameter lists. Our
class has two methods:
Each of these methods expect a single parameter: a temperature to convert. The below
screenshot shows Step 4 of the Wizard with the appropriate values entered:
Step 5 prompts for the component's events. Since our component has no events, leave this
section blank. Finally, Step 6 provides a summary of the options selected. If everything
looks to be in order, go ahead and click Finish, which will create the Windows Script
Component for you,
In Part 3 we'll look at entering the source code for this component. We'll also look at how to register and use our new scripted component!