Skip to content

Instantly share code, notes, and snippets.

@stephenhowells
Last active November 21, 2022 23:07
Show Gist options
  • Save stephenhowells/4599997 to your computer and use it in GitHub Desktop.
Save stephenhowells/4599997 to your computer and use it in GitHub Desktop.
iA Writer AppleScript to preview text in Marked.
-- Preview the currently active iA Writer document using Marked.
tell application "iA Writer"
activate
-- Ask iA Writer for it's active document.
set the_document to document 1
-- Save the document or prompt if not previously saved.
save the_document
-- If the file is saved, open it using Marked.
tell application "Marked"
set the_file to the_document's file
open the_file
-- Bring Marked forward so it becomes visible.
activate
end tell
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment