VCOF0073
OmniFocus: New List Project
Command creates new project with single actions using provided name and parameters. If a single folder is currently selected, the created project will be placed within the selected folder.
Scope and Syntax
Language: English (United States 🇺🇸 · Great Britain 🇬🇧 · Australia 🇦🇺 · Canada 🇨🇦) • Scope: System-Wide
Command phrase variations (words in [brackets] are optional):
- New List Project
Requirements
- Application: OmniFocus 4, OmniFocus: 3.13
- System: macOS 12, iOS 15, iPadOS 15
|
Installing voice commands on iOS/iPadOSWhile Apple’s mobile operating systems currently do not support the Open URL action used in the voice commands files provided on this website, you can still create and use customized Omni Automation voice commands for iPhones and iPads! To create your voice commands, we’ll use specialized Shorcuts workflows that you can “tap-to-install” from the various example pages. Simply follow these steps or view the illustrated instructions here:
You can then activate Voice Control and use your voice command to trigger the shortcut to run the Omni Automation script! |
Downloads
- ⇩ COMMANDS-FILE OmniFocus 4.0 (macOS)
- ⇩ COMMANDS-FILE OmniFocus 3.13 (macOS)
- ⇩ SHORTCUT-LINK (“New List Project”)
Using the Command
The command will present a form for entering the name and selecting parameter settings:

New List Project
(async () => {
try {
function createUtterance(textToSpeak){
AlexID = (
(app.platformName === "macOS") ?
"com.apple.speech.synthesis.voice.Alex" :
"com.apple.speech.voice.Alex"
)
voiceObj = Speech.Voice.withIdentifier(AlexID)
voiceRate = 0.4
utterance = new Speech.Utterance(textToSpeak)
utterance.voice = voiceObj
utterance.rate = voiceRate
return utterance
}
var synthesizer = new Speech.Synthesizer()
// DETERMINE IF SINGLE FOLDER SELECTED
var sel = document.windows[0].selection.folders
if(sel.length === 1){
var selectedItem = sel[0]
} else {
var selectedItem = null
}
// CREATE TEXT FIELD OBJECT
var textInputField = new Form.Field.String(
"textInput",
"Project Name",
null,
null
)
// CREATE List Length MENU
var listValues = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"]
var listIndexes = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
var listMenu = new Form.Field.Option(
"listCount",
"List Length",
listIndexes,
listValues,
1
)
var checkboxSwitch = new Form.Field.Checkbox(
"shouldAutoComplete",
"Complete with last action",
true
)
// CREATE NEW FORM AND ADD FIELD
var inputForm = new Form()
inputForm.addField(textInputField)
inputForm.addField(listMenu)
inputForm.addField(checkboxSwitch)
// VALIDATE USER INPUT
inputForm.validate = function(formObject){
textInput = formObject.values["textInput"]
if (!textInput){return false}
return true
}
// DISPLAY THE FORM
var formPrompt = "Project Parameters:"
var buttonTitle = "Continue"
utterance = createUtterance("Project name and parameters:")
synthesizer.speakUtterance(utterance)
var formObject = await inputForm.show(formPrompt, buttonTitle)
// RETRIVE FORM INPUT
textInput = formObject.values["textInput"]
sequenceLength = formObject.values["listCount"]
shouldAutoComplete = formObject.values["shouldAutoComplete"]
// IF SINGLE TASK OR PROJECT SELECTED ADD TO ITEM
if(selectedItem){
// add to selected folder
var project = new Project(textInput, selectedItem)
} else {
// add to library
var project = new Project(textInput)
}
// SET PROPERTIES
project.containsSingletonActions = true
// ADD TASKS
for (var i = 0; i < sequenceLength; i++) {
var num = i + 1
new Task("Item " + String(num), project)
}
// ENABLE AUTO-COMPLETION
if(shouldAutoComplete){
project.completedByChildren = true
}
// RESPOND USING INPUT
utterance = createUtterance("Done!")
synthesizer.speakUtterance(utterance)
// SELECT NEW PROJECT
URL.fromString("omnifocus:///task/" + project.id.primaryKey).open()
}
catch(err){
if(!err.message.includes("cancelled")){
utterance = createUtterance(err.message)
synthesizer.speakUtterance(utterance)
//new Alert(err.name, err.message).show()
}
}
})();
LEGAL
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Mention of third-party websites and products is for informational purposes only and constitutes neither an endorsement nor a recommendation. OMNI-AUTOMATION.COM assumes no responsibility with regard to the selection, performance or use of information or products found at third-party websites. OMNI-AUTOMATION.COM provides this only as a convenience to our users. OMNI-AUTOMATION.COM has not tested the information found on these sites and makes no representations regarding its accuracy or reliability. There are risks inherent in the use of any information or products found on the Internet, and OMNI-AUTOMATION.COM assumes no responsibility in this regard. Please understand that a third-party site is independent from OMNI-AUTOMATION.COM and that OMNI-AUTOMATION.COM has no control over the content on that website. Please contact the vendor for additional information.