Jump to content

Things for Alfred – Interact with Things 3 using Alfred


Recommended Posts

This action not work with Russian language ?:

 

 

Info from debug:

 

Starting debug for 'Things'

[2018-05-02 13:38:10][ERROR: action.script] 0:82: execution error: Получена ошибка от «Things3»: Не удается получить list "–Т—Е–Њ–і—П—Й–Є–µ" of application "Things3". (-1728)
[2018-05-02 13:38:10][ERROR: input.scriptfilter] Code 1: 0:61: execution error: Получена ошибка от «Things3»: Не удается получить list "–Т—Е–Њ–і—П—Й–Є–µ" of application "Things3". (-1728)
[2018-05-02 13:40:58][ERROR: input.scriptfilter] Code 1: 0:61: execution error: Получена ошибка от «Things3»: Не удается получить list "–°–µ–≥–Њ–і–љ—П" of application "Things3". (-1728)

I think problem with russian Inbox translating and russian project names.

Link to comment
On 5/2/2018 at 7:49 AM, tamvodopad said:

This action not work with Russian language ?:

 

 

Info from debug:

 

Starting debug for 'Things'

[2018-05-02 13:38:10][ERROR: action.script] 0:82: execution error: Получена ошибка от «Things3»: Не удается получить list "–Т—Е–Њ–і—П—Й–Єµ" of application "Things3". (-1728)
[2018-05-02 13:38:10][ERROR: input.scriptfilter] Code 1: 0:61: execution error: Получена ошибка от «Things3»: Не удается получить list "–Т—Е–Њ–і—П—Й–Є–µ" of application "Things3". (-1728)
[2018-05-02 13:40:58][ERROR: input.scriptfilter] Code 1: 0:61: execution error: Получена ошибка от «Things3»: Не удается получить list "–°–µ–≥–Њ–і–љ—П" of application "Things3". (-1728)

I think problem with russian Inbox translating and russian project names.

 

Has it worked for you before or have you just tried the workflow for the first time?

Edited by xilopaint
Link to comment
  • 2 weeks later...
  • 5 months later...
  • 3 weeks later...
On 2/12/2018 at 4:10 AM, xilopaint said:

 

If the keyword todo is not working for you, please paste here what you get in the debug console after typing it.

 

The keyword isn't working for me; here's the debug output:

[2018-11-06 14:46:04][input.scriptfilter] Queuing argument '(null)'
[2018-11-06 14:46:04][input.scriptfilter] Script with argument '(null)' finished
[2018-11-06 14:46:04][ERROR: input.scriptfilter] Code 1: 0:61: execution error: Not authorised to send Apple events to Things3. (-1743)

It used to work at one point, but that was quite a while ago (I've simply not got around to looking deeper into the issue until now).

Edited by TACD
Link to comment
  • 4 months later...

Thank you for this!

 

Is it possible to use the workflow to send you to Things, specifically showing you the Today view of a specific tag?  For example, I use tags to break up my life by 'Work', 'Family and Friends' and 'Personal'.  So, it'd be great if I could call the workflow to put me in a specific view within Things.

Link to comment
16 minutes ago, cjs226 said:

Thank you for this!

 

Is it possible to use the workflow to send you to Things, specifically showing you the Today view of a specific tag?  For example, I use tags to break up my life by 'Work', 'Family and Friends' and 'Personal'.  So, it'd be great if I could call the workflow to put me in a specific view within Things.

 

I will look into implementing such feature. Thanks for the suggestion.

Edited by xilopaint
Link to comment
  • 1 month later...
  • 8 months later...

Hello - just installed the Workflow, works great! Thank you.

 

Question: Is it possible to perform a search for tasks in Things 3 via Alfred? I'd like to type in:

 

todo "searchstring" and then either open Things3 and display the search, or see the options inside Alfred already as a dropdown and enter to open task.

Would that be possible at all? 

 

Thanks!

Link to comment

I just installed this and it seems really buggy that it's not usable. Not sure if perhaps there is an issue with Catalina?

 

My Inbox currently has 45 items in it and they don't show up with this workflow. Most of the other sections are blank as well but sometimes an Area will take a few seconds and then populates with Projects and items. Pressing enter on a Project focuses it in Things instead of showing the items within in in the workflow (I believe the docs indicate that that they should show in Alfred), or at least opening the project in Things.

 

Looks like it could be useful if it worked and was fast.

Link to comment
  • 4 months later...

Hi All, 

 

NOOB QUESTION

 

any idea how to add item to check list?

I know that thanks to this syntax:
 title #tag1 #tag2 [project name/area name] ::note

 

we can add new thing to any given area with note. But what if I have a checklist in given topic and I would like to another item to the checklist?
Anyone know if this syntax can be modified somehow?

Link to comment
  • 2 years later...

@vitor, I'm translating this workflow to JXA. This is how the original AppleScript version calls the script:

 

image.thumb.png.9bc6e16dbe6f818d510495348c2cc53d.png

 

image.thumb.png.bb58de7fed8220429b16ed69e9af3787.png

 

This passes a list of parameters to a run handler in things.applescript.


What is the equivalent way in JXA of passing an array of parameters to the run function of an uncompiled script named things.js?

Link to comment

If you have the script written in JXA with a run function, why use AppleScript or JXA to run it? You can call it from Zsh or Bash like any other script; the arguments will be sent to the function.

 

Also, use with input as argv. And if you’re telling Alfred to filter results you can’t also pass the argument because then there’d be no distinction between the argument and the filtering.

 

Edited by vitor
Link to comment

Hey @vitor, I managed to translate everything to JXA except this small AppleScript handle:

 

on deleteToDo(argv)
    tell application id "com.culturedcode.ThingsMac"
        set toDo to to do id (item 2 of argv as text)
        move toDo to list id "TMTrashListSource"
    end tell
end deleteToDo

 

This was my try:

 

function deleteToDo(argv) {
  const app = Application("com.culturedcode.ThingsMac");
  const toDo = app.toDos.byId(argv[1]);
  const trashList = app.lists.byId("TMTrashListSource");
  toDo.move({to: trashList});
}

 

But I’m getting this error in the toDo.move({to: trashList}); line:

 

ERROR: Things[Run Script] ./things.js: execution error: Error: Error: Can't convert types. (-1700)

 

This is the JavaScript dictionary of the move method of the ToDo object:

 

move method : Move a to do to a different list.
    move specifier : the to do(s) to move
        to: List : List to use as target

 

And this is the dictionary of the ToDo object:

 

ToDo Object : Represents a Things to do.

    elements
    contains tags; contained by application, areas, lists, contacts, projects, tags.

    properties
    id (text, r/o) : The unique identifier of the to do.
    name (text) : Name of the to do
    creationDate (date) : Creation date of the to do
    modificationDate (date) : Modification date of the to do
    dueDate (date) : Due date of the to do
    activationDate (date, r/o) : Activation date of the scheduled to do
    completionDate (date) : Completion date of the to do
    cancellationDate (date) : Cancellation date of the to do
    status ("open"/‌"completed"/‌"canceled") : Status of the to do
    tagNames (text) : Tag names separated by comma
    notes (text) : Notes of the to do
    project (Project) : Project the to do belongs to
    area (Area) : Area the to do belongs to
    contact (Contact) : Contact the to do is assigned to

    methods
    move, schedule, show, edit.

 

Any ideas?

Edited by xilopaint
Link to comment
  • 2 weeks later...
  • 9 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...