Mac Hyp: Getting a Macintosh Resource from a Message (59972)



The information in this article applies to:

  • Microsoft Mail Software Development Kit (SDK) for HyperCard 2.0
  • Microsoft Mail Software Development Kit (SDK) for HyperCard 3.0

This article was previously published under Q59972

SUMMARY

getMacResource retrieves the Macintosh resource with the given type, name, and ID and returns it in a handle. The syntax for getMacResource is as follows:
   msmail(getMacResource, type, name, ID)=>handle
				
Either the name or ID parameters may be empty, but not both. Here are some examples of legitimate parameters:
   put msmail(getMacResource, "snd ","","Simple Beep") into hndl
   put msmail(getMacResource, "PICT", 4007) into hndl
				
getMacResource looks first in the resource fork of the current stack, then in HyperCard's resources, and finally in the System resources. The name and ID of a resource can be found with the ResEdit program from Apple. Note that if the ID is empty, a placeholder ("") must be used.

When you are done using the handle, you should dispose of its contents with disposeHandle.

The "type" parameter lets users specify the 4-character type of the resource to be added, such as "ICON", "CODE", or "snd ".

This information is taken from the "Microsoft Mail HyperCard Interface Documentation."

Modification Type:MajorLast Reviewed:10/2/2003
Keywords:KB59972