I am currently enrolled in a course called Building A Second Brain by Forte Labs, all about organizing and structuring your digital notes for optimal usability and retrievability. It’s awesome so far.
The author, Tiago Forte, is using Evernote as the example through the course but I have decided to implement my “second brain” using EagleFiler.
One concept Tiago has initiated is something called RandomNote - a script that will pull a random note from your library. This will inject some randomness into your mental input and can trigger new ideas. The originating applescript was created for Evernote and has later been built as an application that works on both macOS and Windows.
Naturally I would like to build a similar script for EagleFiler.
The aim of the script is to
- generate a list of all records that are children of a specific folder (exluding folder records)
- pick one of these records at random
- return the selected record. My thought is it could be either in QuickLook or in EF
The first step could also simply be a list of all non-folder records in the library.
But I can’t figure out how to do this. I am not new to applescript but not an expert either and would like some help. I have programming background so I don’t know if it’s just me not understanding applescript syntax or if it’s simply not possible.
I cannot even start with step 1. I tried with
tell application "EagleFiler" tell library document 1 set _record to library record whose name is "1 Projects" end tell end tell"
But get error "Can’t get library record whose name = “1 Projects” "
Is it possible to get all records that are children of a container? Is it possible to select a record based on values such as name, title, kind etc?