Code Monkey home page Code Monkey logo

omnifocus-3-applescript-guide's Introduction

OmniFocus 3 AppleScript Guide

Index of classes, properties, commands, qualifiers

Classes

  • task[s]
  • project[s]
  • folder[s]
  • tag[s]

Properties

Task properties

  • name (string)
  • note (string)
  • primary tag (tag) (creation only)
  • tags (list of tags) (modification only)
  • flagged (boolean)
  • completed (boolean)
  • creation date (date)
  • start date (date)
  • defer date (date)
  • due date (date)

Project properties

  • name (string)
  • note (string)
  • singleton action holder (boolean)
  • sequential (boolean)
  • creation date (date)
  • start date (date)
  • defer date (date)
  • due date (date)

Folder properties

  • name (string)

Tag properties

  • name (string)

Commands

Below, "task" means the literal string "task". "tasktype" means a reference to an object of class "task".

  • make new (task|tag|project|folder) with properties {property:value[, property:value...]}
  • move (tasktype|tagtype|projecttype|foldertype) to (end of (tags|projects|folders) of (tagtype|projecttype|foldertype))
  • remove tagtype from tags of tasktype
  • add tagtype to tags of tasktype
  • set (tasktype|projecttype) to the parent task of tasktype

Qualifiers

  • (task|tag|project|folder) whose name is string
  • (task|tag|project|folder) where its name is string
  • flattened (tasks|tags|projects|folders): retrieve matching items without having to locate them within a specific hierarchy

Examples

tell front document of application "OmniFocus"

  -- Create a new project and save to variable `theProject`
  set theProject to make new project with properties {name:"Project Name", singleton action holder: true}

  -- Create a new task and save to variable `theTask`
  set theTask to make new inbox task with properties {name:"Task Name", note:"Task Note"}

  -- Move `theTask` inside of `theProject`
  move theTask to end of tasks of theProject

  -- Create a new task directly inside `theProject`
  tell theProject
    set theOtherTask to make new task with properties {name:"Other Task Name", note:"Other Task Note"}
  end tell

  -- Create a new tag
  set newTag to make new tag with properties {name:"New Tag"}

  -- Add `newTag` to `theOthertask`
  add newTag to tags of theOtherTask

  -- Create a new task with `newTag` in Inbox
  set theThirdTask to make new inbox task with properties {name:"A Third Task", primary tag:newTag}

end tell

References

The following scripts and guides were an enormous help and this guide wouldn't be possible without them:

omnifocus-3-applescript-guide's People

Contributors

jsit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

omnifocus-3-applescript-guide's Issues

AppleEvent handler failed

Hi @jsit! First off, thank you for creating this source. It has inspired me to fix my github-to-omnifocus tool.

Currently, I'm hitting an error that I'm unsure how to fix. Would you know why this happens:

image

The task gets added but it always throws:

error "OmniFocus got an error: AppleEvent handler failed." number -10000

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.