Automation

EasyFind is built to be driven from scripts and other apps.

AppleScript

There is a full scripting dictionary; open it in Script Editor ▸ File ▸ Open Dictionary…. The application has search windows and saved sets elements and a menu bar mode property. A search window exposes name, search text, result count, a read-only searching flag, and a results element, and responds to close. A result exposes name, POSIX path, size, kind, dates, comment and tags, and responds to open, reveal, move to trash and rename.

The search command runs a search and waits until it has finished, so the results are ready the moment it returns:

tell application "EasyFind"
    -- Search file contents and read the hits (the call blocks until the search completes)
    set theSearch to search "report" in (POSIX file "/Users/me/Documents") ¬
        searching contents operator boolean and wildcards matching files only
    repeat with r in (results of theSearch)
        log (name of r) & tab & (path of r)
    end repeat

    -- Filter by date and/or size; leave the term empty to search by attributes alone
    set recent to search "" in (POSIX file "/Users/me/Downloads") ¬
        modified after ((current date) - 7 * days) larger than 1000000

    -- Reveal the first hit, then recall a saved search
    if (count of results of theSearch) > 0 then reveal result 1 of theSearch
    recall saved set "Invoices"
end tell

The search command takes optional searching (name, contents, Finder tags, comments), operator, matching (files only, folders only, or files and folders), the option toggles case sensitive, ignoring diacritics, including invisibles, searching package contents and including all file types, plus date and size filters: larger than / smaller than in bytes, and modified after / modified before / created after / created before as dates. With a date or size filter set you can pass an empty term to search by attributes alone. EasyFind compares a single date field, so if you pass more than one date the last wins; size is independent. The recall command opens a saved set and accepts an optional searching for term that overrides the set’s own, which is handy for sets that store only locations and options. Saved sets are a read-write element, so delete saved set "Invoices" removes one:

tell application "EasyFind"
    recall saved set "My Folders" searching for "report"
end tell

The dictionary is full of copy-and-paste AppleScript and JavaScript (JXA) examples on every class and command.

Shortcuts & Siri

First-class Shortcuts actions let you automate EasyFind without writing code, and Siri runs searches and saved sets by voice (see the end of this section):

Each returned search result carries the same properties the AppleScript result class exposes (name, path, kind, size, modification and creation date, tags, and the Finder comment) so later actions can read, filter, and sort them. A result also converts to a file, so the output of Search Files and Run Saved Set can feed any action that takes files, such as Quick Look, Copy File, or third-party actions.

EasyFind adopts the system in-app search action, so you can say things like “Search EasyFind for last year’s invoices” and Siri opens EasyFind and runs the search on screen. Because a saved search is nameable, “Run the Invoices set with EasyFind” works too. For an open-ended spoken search term, use these voice and Siri paths, since a fixed phrase can name a saved set but can’t carry an arbitrary typed term. Your saved sets and saved locations are indexed by name, so they turn up in Spotlight too. The spoken search is for Siri only and doesn’t appear among the Shortcuts actions; in a shortcut, Search Files does the same with every option above.

URL scheme

Other apps and links can drive EasyFind via easyfind://:

easyfind://search?q=<term>&path=<folder>
easyfind://set?name=<saved-search-name>

The classic GetURL Apple event is handled too, so open location "easyfind://…" works from scripts.

Services

Select text or a folder in another app and use the Services menu: Find with EasyFind searches the selected text, and Search Folder with EasyFind searches the selected folder.

Script menu

EasyFind installs a ready-to-use sample script, Search Front Finder Folder, into ~/Library/Scripts/Applications/EasyFind/, refreshed on each new version, so it appears in the system Script menu. Enable it in Script Editor ▸ Settings ▸ General.