Important: The information in this document is obsolete and should not be used for new development.
OSACopyID
You can use theOSACopyID
function to update script data after editing or recording and to perform undo or revert operations on script data.
FUNCTION OSACopyID(scriptingComponent: ComponentInstance; fromID: OSAID; VAR toID: OSAID): OSAError;
scriptingComponent
- A component instance created by a prior call to the Component Manager function
OpenDefaultComponent
orOpenComponent
(see page 10-4).fromID
- The script ID for script data that you want to be associated with the script ID in the
toID
parameter.toID
- The script ID for the script data to be replaced. If the value of this parameter is
kOSANullScript
, theOSACopyID
function returns a new script ID.DESCRIPTION
TheOSACopyID
function replaces the script data identified by the script ID in thetoID
parameter with the script data identified by the script ID in thefromID
parameter.RESULT CODES
noErr 0 No error errOSASystemError -1750 General scripting system error errOSAInvalidID -1751 Invalid script ID badComponentInstance $80008001 Invalid component instance