Using the ASF Script Builder Utility
The following procedure shows how to use ASF Script Builder to create a script file, and then add the script file to an existing .asf file.
To create a script file
- Choose an .asf file to which you want to add properties, markers, and script commands.
- Start Nsscript.exe. The default path to this file is C:\Program Files\Windows Media Components\SDK\Samples\ScrBld.
- In the Properties section, type the title, author, copyright, description, and rating. When an .asf file is played, the properties appear in the display area and in Properties of Windows Media Player.
- Add markers and script commands. Under either Markers or Scripts, click New, and then type information in the dialog box that opens. After you enter the information and close the dialog box, the marker or script command is added to the appropriate list. You can also edit or remove a marker or script command.
- Use the Stopwatch while playing the .asf file to help pinpoint timings.
- When you finish, create the script file by clicking Save on the File menu. If you must manage many files, it is helpful to give the script file the same root name as the .asf file, such as music01.txt and music01.asf.
To add the script file to the .asf file
- Open Windows Media ASF Indexer, and then open the .asf file. ASF Indexer is a component of Windows Media Tools.
- On the File menu, click Import from script file, and open the script file you have just created. When you do so, properties, markers, and script commands are added to ASF Indexer.
- To save the script file elements with the .asf file, click Save.
When the file is played back in Windows Media Player, the markers are made available in a table of contents, and can be used to seek to positions in the file. Depending on the script command type string, a script command is either processed directly by Windows Media Player, or processed by scripting in an HTML document. For a script command to be available to a Web browser, Windows Media Player must be embedded using the Microsoft® ActiveX® or Netscape Navigator plug-in interfaces.
Note The ASFChop command-line utility can also be used to add a script file to an .asf file.
See Also
About the ASF Script Builder Utility Sample, ASF Script Builder Utility Sample, Windows Media Technologies Solutions Samples
© 1996-1999 Microsoft Corporation. All rights reserved.