Image finder plugins

@nut-tree/template-matcher


Installation

npm i @nut-tree/template-matcher

Attention: @nut-tree/template-matcher only supports node up to v16 and Electron up to v13. It is also NOT available for Apple Silicon.

In case you want to use image search in later versions of node/Electron, or on Apple Silicon devices, please consult the sponsoring profile for access to @nut-tree/nl-matcher.


Usage

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

const {screen, imageResource} = require("@nut-tree/nut-js");
require("@nut-tree/template-matcher");

(async () => {
    const img = await screen.find(imageResource("..."));
})();

Configuration

@nut-tree/template-matcher takes an optional configuration object passed to it via MatchRequest#providerData property.

export interface TemplateMatcherProviderData {
    searchMultipleScales: boolean; // default: true
}
const {screen, imageResource} = require("@nut-tree/nut-js");
require("@nut-tree/template-matcher");

(async () => {
    const img = await screen.findAll(imageResource("..."), {
        providerData: {
            searchMultipleScales: false
        }
    });
})();
Previous
@nut-tree/bolt