Skip to main content

ImageFinderInterface

Currently, there are two official ImageFinder implementations provided by nut.js.

@nut-tree/template-matcher#

npm i @nut-tree/template-matcher

Initial implementation for on-screen image search.

Usage#

Simply require / import the package to wire up the provider:

const { screen } = require("@nut-tree/nut-js");
require("@nut-tree/template-matcher");
(async () => {
const img = await screen.find(imageResource("..."));
})();

@nut-tree/nl-matcher#

npm i @nut-tree/nl-matcher

Attention: @nut-tree/nl-matcher is only available to sponsors of nut.js. In case you want to get access to it, please consult the sponsoring profile

Next Level module for image search.

Comes with additional features compared to @nut-tree/template-matcher

See the table below for a comparison of both modules:

@nut-tree/template-matcher@nut-tree/nl-matcher
Windows✔️✔️
Linux✔️✔️
Apple (Intel) / Apple (Apple Silicon)✔️ / ❌✔️ / ✔️
find✔️✔️
findAll✔️
Supports node 12 / 13 / 14 / 15 / 16 / 17 / next✔️ / ❌ / ✔️ / ✔️ / ✔️ / ❌ / ❌✔️ / ✔️ / ✔️ / ✔️ / ✔️ / ✔️ / ✔️
Supports Electron 8 / 9 / 10 / 11 / 12 / 13 / 14 / 15 / 16 / next✔️ / ✔️ / ✔️ / ✔️ / ✔️ / ✔️ / ❌ / ❌ / ❌ / ❌✔️ / ✔️ / ✔️ / ✔️ / ✔️ / ✔️ / ✔️ / ✔️ / ✔️ / ✔️

Usage#

Simply require / import the package to wire up the provider:

const { screen } = require("@nut-tree/nut-js");
require("@nut-tree/nl-matcher");
(async () => {
const img = await screen.findAll(imageResource("..."));
})();