F-Script:从对象浏览器到脚本控制台获取对象引用

发布于 2024-09-01 17:04:16 字数 199 浏览 4 评论 0原文

我试图弄清楚如何将我通过 F-Script 的对象浏览器找到的对象获取到脚本控制台。例如,正如对象资源管理器告诉我的那样,我在地址 0x234243242 处找到了一个 NSString 实例。现在,我想通过脚本控制台调用它的实例方法(我知道我可以通过对象浏览器调用它的方法)。

谁能提示我如何做到这一点? F-Script 文档和 Google 都无法为此提供答案。

I am trying to figure out how to get an object I have found via the object-browser of F-Script to the script console. For example, I found an instance of NSString at adress 0x234243242 as the object explorer tells me. Now, I would like to call an instance method on it via the script-console (I know that I can call a method on it via the object-browser).

Can anyone give a hint how i could do this? Neither the F-Script documentation, nor Google was able to provide me an answer for this, yet.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

掩于岁月 2024-09-08 17:04:16

您可以单击浏览器中的“名称”按钮,为其指定一个名称,然后在控制台中使用该名称。

You can click the "Name" button in the browser, give it a name, then use that name in the console.

情绪操控生活 2024-09-08 17:04:16

我也找不到直接使用 F-Script 执行此操作的方法,但这里有一种将 Cocoa 与 F-Script 指针集成的方法:

ptr := FSPointer objectPointer
scanner := NSScanner scannerWithString:'0x234243242'
scanner scanHexLongLong:ptr
object := ptr at:0

I couldn't find a way to do this directly with F-Script either, but here's a way that integrates Cocoa with F-Script pointers:

ptr := FSPointer objectPointer
scanner := NSScanner scannerWithString:'0x234243242'
scanner scanHexLongLong:ptr
object := ptr at:0
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文