简体   繁体   English

以编程方式打开本地 macOS 帮助/用户指南窗口

[英]open the local macOS help/user guide window programmatically

Is there a way to open the macOS user guide/help of a specific topic on the machine itself?有没有办法在机器上打开特定主题的 macOS 用户指南/帮助?

For example I want to link this article from my application to the official Apple help: https://support.apple.com/guide/mac-help/mchlp2290/mac例如,我想将这篇文章从我的应用程序链接到 Apple 官方帮助: https : //support.apple.com/guide/mac-help/mchlp2290/mac

Instead of opening the browser I would like to open the included macOS help window.我想打开包含的 macOS 帮助窗口,而不是打开浏览器。 Why?为什么? Because it's offline available, natively in macOS included, translated to the users language and includes useful links.因为它是离线可用的,原生包含在 macOS 中,翻译成用户语言并包含有用的链接。

在此处输入图片说明

To display content in the built-in Help window, you need to include a "Help Book" in the app.要在内置帮助窗口中显示内容,您需要在应用程序中包含“帮助手册”。

https://developer.apple.com/library/archive/documentation/Carbon/Conceptual/ProvidingUserAssitAppleHelp/user_help_intro/user_assistance_intro.html https://developer.apple.com/library/archive/documentation/Carbon/Conceptual/ProvidingUserAssitAppleHelp/user_help_intro/user_assistance_intro.html

Once you've done that, the "Help Book" can contain anchors , and you can call openHelpAnchor(_:inBook:) to open the Help window showing that anchor.完成后,“帮助手册”可以包含anchors ,您可以调用openHelpAnchor(_:inBook:)打开显示该锚点的帮助窗口。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM