====== Command Line Options ====== * [[#specifying_the_tasklist_and_task|Specifying the tasklist and task]] * [[#shortcuts|Shortcuts]] * [[#summary|Summary]] of available Switches (command-line options) * [[#details|Details]] for Switches The behavior of ToDoList can be set on execution from the command-line. This is usually set in the shortcut used to execute the program (see below for setting up a shortcut), but can also be used as automation for another process to set values while the application is up. Commands can also be executed as a [[user-defined-tools|User-Defined Tool]] (UDT). In this case, ToDoList re-executes itself, passing specific parameters in the command-line. This is essentially the program telling itself to do something - the result being a limited form of automation. An example might be a UDT to close a task, simultaneously changing the status and adding a comment. As with most Windows programs that support options (also called "switches", like a light on/off switch), the pattern to follow is: X:\path\to\executable\ToDoList.exe -a valuea -b "value b" -tid 000 "filepath" In all of these examples, a value must be enclosed in quotes if it contains a space, otherwise quotes are not necessary. The filepath to the affected tasklist .tdl file should be specified at the beginning or end of the command, either will work. However, if the filepath follows a sequence of values it will be included in those values, so the filepath should be first. Example: X:\path\to\executable\ToDoList.exe -tid 123 -c category1 category2 "filepath" That results in three categories on the current tasklist, the third is the filepath. Instead use this format to get two categories on the specified tasklist: X:\path\to\executable\ToDoList.exe "filepath" -tid 123 -c category1 category2 In Windows, switches can be in upper-case or lower-case, it doesn't matter. In Linux, switches may need to be in lower-case. ===== Specifying the tasklist and task===== When ToDoList is executed from a command-line: If the application is not open it is opened. If the application is already open, the most recent active/existing instance is used. (See [[multiple-instances|Multiple Instances]].) The parameter *must* be used when sending a command to a list or task, or the command will transparently fail. (The does not need to be specified in a shortcut when re-opening a collection of tasklists, as the .ini file includes the list of tasklists to open. A command targeting a list or task without a filepath will always open a new instance of the application but it won't do anything.) If the specified tasklist is not already open it will be opened and this becomes the currently selected tasklist. If the -tid switch is used, the indicated task then becomes the currently selected task, otherwise the currently selected task will be operated on. ===== Shortcuts===== To create a Windows shortcut: * Use the right-mouse on ToDoList.exe. * Select Create Shortcut. This creates file "ToDoList.exe - Shortcut". * Move this file to your desktop. * Rename the shortcut file to something like, um "ToDoList'. To modify the command-line used by that shortcut: * Right-mouse the shortcut file and select Properties. * Select the Shortcut tab if it's not already selected. * The Target field already has a full "x:\path\ToDoList.exe". Modify this with any of the options from this page. * Since we're here... You may need to execute ToDoList with Administrator privileges so that it can write to files or download updates. To do this, on the Shortcut tab, click Advanced. Then check "Run as Administrator". Then click OK. * When done, click OK to save and exit. ===== Switches===== ^Switch^Value^Description^ |[[#-ab|-ab]]| |Sets the 'Allocated By' for the currently selected task| |[[#-at|-at]]| |Modifies the 'Allocated To(s)' for the currently selected task| |[[#-bid|-bid]]| |Specifies the sibling task after which to create the new task| |[[#-c|-c]]| |Modifies the 'Category(s)' for the currently selected task| |[[#-cd|-cd]]| |Modifies the 'Completion Date' (and optionally the time) for the currently selected task| |[[#-cm|-cm]]| |Sets the 'Comments' for the currently selected task| |[[#-cmd|-cmd]]| |Sends the specified command to ToDoList's main window| |[[#-copy|-copy]]| |Copies the value for 'attrib1' to 'attrib2' for the currently selected task| |[[#-cs|-cs]]| |Modifies the 'Cost' for the currently selected task| |[[#-ct|-ct]]|