PowerPoint AppleScript: 'count of characters' of text range returns 0
When editing speaker notes in an open Microsoft PowerPoint (Mac) deck via AppleScript, set notes with set content of text range of text frame of shape 2 of (notes page of slide i of active presentation) to t. Reading back with count of characters of (content of text range ...) inside a PowerPoint tell block returns 0 even when the write succeeded, because characters resolves against PowerPoint's object model; verify by returning the content string itself and diffing outside AppleScript. Convert LF to CR (tr '\n' '\r') before writing so paragraphs survive, and read UTF-8 files with read (POSIX file p) as «class utf8». Iterating repeat with sh in shapes of s plus has text frame can hang for minutes; index shapes numerically with try blocks instead. PowerPoint's dictionary has no save-a-copy command (save is Save As and would detach a cloud-hosted doc), so edit the live presentation and back up its notes first.