OSACopyID
You can use the OSACopyID 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 or OpenComponent (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, the OSACopyID function returns a new script ID.
DESCRIPTION
The OSACopyID function replaces the script data identified by the script ID in the toID parameter with the script data identified by the script ID in the fromID parameter.
RESULT CODES
| noErr | 0 | No error |
| errOSASystemError | -1750 | General scripting system error |
| errOSAInvalidID | -1751 | Invalid script ID |
| badComponentInstance | $80008001 | Invalid component instance |