Apple Events是Mac程序进程间通信的一种方式。
Apple Events相关概念
Apple Event (实际上是一个AEDescriptor 列表,包含Attribute Descriptor和Parameter Descriptor)
Apple Event Record (AERecord): A descriptor whose data is a list of keyword-specified descriptors.
Descriptor(AEDes): 存储数据和附带的描述符类型。构建Apple Event的基本结构。
Parammeter (size, descriptor type)
Attribute (size, descriptor type)
(An Apple event consists of attributes (which identify the Apple event and denote its task) and, often, parameters (which contain information to be used by the target application). )
从apple event中读取数据
steps:
1 创建Descriptor
2 Extract Data
ways
1 获取data的Descriptor
AEGetParamDesc
2 获取data buffer
AEGetParamPtr
Apple Event Manager 方法
AESizeOfAttribute
AESizeOfParam