Cocoa Scripting Bridge 和 <contents>元素

编程入门 行业动态 更新时间:2024-10-25 18:24:35
本文介绍了Cocoa Scripting Bridge 和 <contents>元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送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 和 &lt;contents&gt;元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-04-17 13:53:08,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/915717.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:元素   Bridge   Scripting   Cocoa   amp

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!