Previous Book Contents Book Index Next

Inside Macintosh: Apple Guide Complete / Part 4 - Scripting Guide Files
Chapter 10 - Guide Script Command Reference / Guide Script Command Descriptions
/ Importing Resources

<Starting Res Number>

You can use the <Starting Res Number> command to specify the beginning resource number that Guide Maker should use when numbering any resources that it creates.

<Starting Res Number> resID
A short integer specifying the beginning resource ID that Guide Maker should use for resources that it creates for your guide file. This number must be between 2000 and 20,000.
If you specify a <Starting Res Number> command, then for resources that Guide Maker creates, it begins numbering them using the specified resource ID.

For resources specified by filename in all Guide Script commands except the <Resource> command, Guide Maker reads the resource and assigns it a new resource ID, based on the value you specify in the <Starting Res Number> command.

For resources that you import in a <Resource> command or for resources that you specify by resource ID or resource name in other Guide Script commands, Guide Maker does not assign the resource a new resource ID. When Guide Maker encounters a <Resource> command, it opens the file referenced by the fileName parameter and reads in the resources described by the resType and whichResource parameters. It uses the resource's assigned resource ID and does not change or reassign it. These resources are then compiled into the guide file and are available for use by other Guide Script commands, such as the <PICT> and <QuickTime> commands.

Using a <Starting Res Number> command can be useful when your guide file includes a Mixin guide file; using this command can help prevent resource ID conflicts between resources created by Guide Maker for your main guide file and resources created when you compile a Mixin guide file.

The <Starting Res Number> command should appear once at most in your source files for a specific guide file. If you use this command, it must appear as the first command specified in the first file referenced by your build file. The <Starting Res Number> command is valid only for main guide files.

#Build file for SurfWriter guide file
<Include> "Initial Setup"
<Include> "Panel and Sequence definitions"
#End of Build file for SurfWriter guide file

#In the file named "Initial Setup"
#for resources specified by filename, assign resource IDs
# beginning with 3000
<Starting Res Number> 3000
#read in the 'PICT' resource with resource ID 2228 
# from the file "My Pict for Movie"
<Resource> "My Pict for Movie", 'PICT', 2228
#End of "Initial Setup"

#In the file named "Panel and Sequence definitions"
<Define Panel> "Example Panel With Movie 3"
   #place a QuickTime movie on the panel and specify
   # replacement picture as 'PICT' resource with res ID 2228
   <QuickTime> "My QT Movie", CENTER, PLAIN, 2228
   #place a picture on the panel (specified by filename)
   #Guide Maker gets the color pict from the file and
   # assigns it a new resource ID; it assigns the b&w pict
   # the next sequential resource ID
   <PICT> "ColorPic1 File", CENTER, "B&WPic1 File"
<End Panel>
For information on the <Resource> command, see page 10-101. For information on specifying a starting resource number for a Mixin guide file, see the description of the <Mixin> command, on page 10-19.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
12 JUL 1996