Part of the Samples Website. 8/16/97.

samples.basicStuff.resourceMap

«Creates an outline listing of all resources in a file
local (f = Frontier.getProgramPath ())
if not file.getFileDialog ("Choose a file to map", @f, 0)
return
local (adrOutline = @scratchpad.resourceMap)
new (outlineType, adrOutline)
target.set (adrOutline)
edit (adrOutline)
local (cttypes = rez.countResTypes (f), i, id, name, data, currenttype, j, ct, dir)
for i = 1 to cttypes
rez.getNthResType (f, i, @currenttype)
ct = rez.countResources (f, currenttype)
op.insert (currenttype, down)
dir = right
for j = 1 to ct
rez.getNthResInfo (f, currenttype, j, @id, @name)
op.insert ( "Name: " + name + "; ID: " + id, dir)
dir = down
op.go (left, 1)
op.firstSummit ()
op.deleteline ()
window.zoom (adrOutline)
target.clear ()


This page was last built on Sat, Aug 16, 1997 at 6:39:58 PM. You can download the current set of sample scripts from our FTP site. Dave