Alfred Handlers
IntroductionProvides the handlers that take input directly from Alfred. DiscussionIn order to use a handler within Alfred, it is necessary to
first load the workflow script. Alfred provides the user's
query by string substitution of the To load the workflow script and pass in the user's query, follow this example:
It is important to note the text escaping options in Alfred. For this workflow, only the Double Quotes and Backslashes options should be checked. Excess escaping can cause problems handling simple characters such as spaces. Functions
addListAdds a new list to Wunderlist on addList( listName) ParametersDiscussionAfter calling this handler, Wunderlist remains activated with the keyboard focus on the task input for the new list. addTaskAdds a task to Wunderlist on addTask( task) ParametersDiscussionTo support Script Filter inputs and keyboard entry, the task may
be prefixed by a list identifier to insert it into a specific list using
addTaskToList. The prefix ensures that the task is added to a
specific list. Without it, for example if If Wunderlist is on a screen that does not allow task input, such as search results or the Assigned to Me screen, the task will be added in the Inbox. After calling this handler, the previous application is reactivated. However, if
List Identifiers To identify a list by name,
To identify a list by index,
addTaskToInboxAdds a task to the Inbox list in Wunderlist on addTaskToInbox( task) ParametersDiscussionProvides a shortcut for entering tasks directly in the Inbox. After calling this handler, the previous application is reactivated. However, if
addTaskToListAdds a task to the specified list in Wunderlist on addTaskToList( listIndex, task) ParametersDiscussionUses focusListAtIndex to focus the specified list, then inserts the task. If the specified list does not allow task input, such as Assigned to Me or Week, the task will be added in the Inbox. After calling this handler, the previous application is reactivated. However, if
runProvides support for command line operations on run( argv) ParametersReturn Value1 for success or 0 for error Commands
showListOptionsA Script Filter input that shows the user's lists in Alfred, allowing a task to be added to a specific list. on showListOptions( task) ParametersDiscussionQueries the Wunderlist UI to provide all of the lists into which new tasks can be added. The response is formatted for Alfred to display in a way that allows the user to type their task, then action a specific list to insert the task there. After selecting one of these options, the final query will be a concatenation of the list index and the user's task in a format suitable for addTaskToList:
|