Created
September 23, 2021 09:27
-
-
Save KingOfSpades/dd6af8da4838b880a875a61217f61394 to your computer and use it in GitHub Desktop.
JXA And Things3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var TaskApp = Application('Things3'); | |
var projectObj = TaskApp.Project({ | |
name: "Test Project" | |
}) | |
TaskApp.projects.push(projectObj) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var TaskApp = Application('Things3'); | |
var toDo = TaskApp.ToDo({ | |
name: "test", | |
notes: "notes", | |
project: "" | |
}) | |
TaskApp.toDos.push(toDo) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var TaskApp = Application('Things3') | |
var TaskName = "This is a new task" | |
var TaskNote = "It has some extra info" | |
var today = new Date() | |
var toDo = TaskApp.ToDo({ | |
name: TaskName, | |
notes: TaskNote | |
}) | |
// Creates the todo in the inbox | |
TaskApp.toDos.push(toDo) | |
// Gets the todos in the inbox | |
var inboxList = TaskApp.lists["Inbox"].toDos | |
// Select the task you just created | |
TaskApp.schedule(toDo, {for: today}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var TaskApp = Application('Things3') | |
var today = new Date() | |
var toDo = TaskApp.ToDo({ | |
name: "Due date test", | |
notes: "notes", | |
dueDate: today | |
}) | |
TaskApp.toDos.push(toDo) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var TaskApp = Application('Things3') | |
list = TaskApp.lists["Today"] | |
TaskApp.activate() | |
list.show() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var TaskApp = Application('Things3'); | |
var task = TaskApp.lists["Inbox"].toDos["test555342343"] | |
TaskApp.activate() | |
task.show(task) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment