eM CLient v11 macOS and Script Editor

While it’s great there is now some AppleScript integration, it also means one has to use AppleScript. So I turned to Lumo AI for help.

I want to try to replace a manual task with a script to:

Find the latest e-mail from a certain sender with a certain subject in a certain sub-folder - DONE

Parse the HTML table in the e-mail and extract a value from it - Head is starting to bleed, even with the help of an AI (I refuse to try to learn AppleScript for this).

Write the extracted value to a CSV or JSON file - Not got there yet.

Lumo just suggested grepping the DB.

Naively I would try to save the found message to .eml or .pdf.

Am I asking too much of the current state of eM Client’s AppleScript integration?

Other/ better approaches?

Other/ better approaches?

Yep. Query IMAP directly via python or something like that. It can all now be done via a cron job too.

Too much of the stuff “under applescript control” involved opening menus/ submenus directly, but then trying to use tricks to get keystrokes to appear as required.

While the searching was OK for identifying e-mails, saving indirect files, searching the eM Client local mailstore (the sqlite DB did not yield its secrets), etc. was not.

Parsing saved .eml files was clumsy. Finding where they were exported to needed a find command (couldn’t specify where to save them due to the way applescript sent keystrokes…).

I suppose I shouldn’t try to force a GUI to behave like this. Especially a macOS app, where keyboard shortcuts are few and far between.