38.4. aetypes — AppleEvent 对象

aetypes定义用于表示 Apple Event 数据 Descriptors 和 Apple Event 对象说明符的类。

Apple Event 数据包含在 Descriptors 中,并键入这些 Descriptors。对于许多 Descriptors,Python 表示形式只是对应的 Python 类型:OSA 中的typeText是 Python 字符串,typeFloat是浮点型,等等。对于没有直接 Python 对应物的 OSA 类型,此模块语句类。这些类的打包实例由aepack自动处理。

对象说明符本质上是在 Apple Event Server 中实现的对象的地址。 Apple Event 说明符用作 Apple Event 的直接对象或用作可选参数的参数。 aetypes模块包含 OSA 类和属性的 Base Class,由gensuitemodule生成的包使用这些 Base Class 来填充给定套件中的类和属性。

出于向后兼容性的原因,以及需要编写尚未为其生成存根包的应用程序的脚本的情况,此模块还包含许多常见 OSA 类(例如DocumentWindowCharacter等)的对象说明符。

Note

该模块已在 Python 3.x 中删除。

AEObjects模块定义以下类来表示 Apple 事件 Descriptors 数据:

生成的存根包将以下类用作 Base Class,以表示 Python 中的 AppleScript 类和属性:

首页