且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

您如何获得有关其他正在运行或重点关注的应用程序的信息?

更新时间:2023-02-13 14:34:49

否,Electron不提供API来获取有关其他应用程序的信息。您需要直接访问本机平台API才能获取该信息。例如, Tockler 似乎是通过shell脚本执行的,尽管我个人更喜欢直接通过本机Node访问本机API。插件/模块或 node-ffi-napi

No, Electron doesn't provide an API to obtain information about other apps. You'll need to access the native platform APIs directly to obtain that information. For example Tockler seems to do so via shell scripts, though personally I prefer accessing native APIs directly via native Node addons/modules or node-ffi-napi.