问题描述
限时送ChatGPT账号..因此,我尝试编写脚本的应用程序有一个脚本定义文件,其中包含一个 <contents>元素,它是一个隐式指定的容器".
So, the application I'm trying to script has a scripting definition file that includes a <contents> element, which is an "implicitly specified container."
问题,我如何使用 Scripting Bridge 获取此元素内部的内容?或者,我如何发送检索它所需的 Apple 事件,然后将我得到的内容转换回 SBObject?
The question, how do I get at what's inside this element using Scripting Bridge? Or alternatively, how do I send the Apple Event necessary to retrieve it and then transform what I get back into an SBObject?
我已经试过了:
[document nameOfKey]
document.nameofKey
[document contents]
document.contents
推荐答案
不确定这是否会有所帮助,但我注意到有时您必须使用关键字get"才能真正获得某些东西,然后才能访问其他部分它.所以我会试试这个...
Not sure if this will help but I noticed that sometimes you have to use the keyword "get" in order to actually get something before you can access other parts of it. So I would try this...
[[document get] contents]
[[document contents] get]
等等.请注意,get"是 SBObject 的一个实例方法,因此您可以在文档中找到它.
etc. Note that "get" is an instance method of SBObject so you can find it in the docs.
这篇关于Cocoa Scripting Bridge 和 <contents>元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
更多推荐
[db:关键词]
发布评论