rez.getNthResType

Syntax rez.getNthResType (path, n, addr)

Params path is a path to the file in which you wish to determine a resource type in a designated position on the file's list of resource types.

n is a number indicating the relative position in the list of resource types where you wish to identify the resource type.

addr is an address where you wish the type of resource stored at the nth location in the file's list of resource types to be stored - a sting4 value.

Action Determines the nth resource type in the file's list of resource types.

If found, the Object Database cell pointed to by addr is filled with the resource's type, a four-character string4.

Returns True if the resource type was found, false otherwise (for example, if n is greater than the number of resource types contained in the file at path.

Examples rez.getNthResType ("frontier.root", 1, @type); return (type)
» DLOG

rez.getNthResType ("frontier.root", 3, @type); return (type)
» TEXT

rez.getNthResType ("frontier.root", (rez.countResTypes ("frontier.root")+1), @type)
» false « There is no resource type at the indicated location, obviously!

Platform Notes This verb is only implemented in the Mac OS version of Frontier.

Notes This is an advanced Frontier verb of primary interest to implementers and advanced scripters. It is not necessary to understand it to use Frontier effectively for most tasks.

Combined with rez.countResTypes you can access all the resource types in a file.

See Also rez.getNthResource

Discuss