Questions about opening files on Alfred

It doesn’t matter, very happy to communicate with you. :rofl:

I previously forgot to ask this: Where do you get these DEVONthink links from?

I ask because I can’t imagine a scenario where I would have a plain text DEVONthink link and wanted to open its file in another app.

So what’s the scenario?

I bet you didn’t tell him that someone already wrote an AppleScript to open the file …

The problem of opening is solved. Your problem is that you don’t know how to tell Alfred what it should process. You need to find a way to deliver Alfred your input. Without input no workflow.

I often use a software called Hook (https://hookproductivity.com) to get DT’s file links and link two or more files in both directions, the trouble is that some software does not support url scheme, so I can only write down DEVONthink links to quickly open the relevant files.

I would 100% like to be able to process PDFs directly in DT, but unfortunately I need to process a lot of PDFs that contain Chinese, and if I do it internally in DT (e.g. highlighting or notes), all the Chinese in the PDF will be garbled (according to the official response from DT, this seems to be due to the PDFkit framework of macOS) and cannot be fixed by DT)

You are right, I will add to him. :grimacing:

Try this in Alfred

In the Workflow you created:

  • Contextual menu > Triggers > Fallback Search
  • Enter a meaningful title, e.g. “Open DEVONthink link with default app”
  • Connect the new trigger with the previously created Run Script action by dragging from its right side onto the Run Script action

On Alfred’s left side:

  • Select the Features tab (above Workflows)

In the sidebar:

  • Select Default Results

In the main area:

  • Click Setup fallback results

In the new window:

  • Click the + at the bottom
  • Select Workflow Trigger
  • Select the title you’ve chosen, e.g. “Open DEVONthink link with default app”
  • If there were already fallback searches you might want to drag your new fall back search to the top of the list for easier access.

Done!

Now when you invoke Alfred and paste a DEVONthink link you should be able to select the workflow that will open files in their default app.

Nice!!! It works perfectly! You’re so amazing!! :100: :wine_glass:

1 Like

Great!

If you want a nicer icon:

  • Go back to the Workflow
  • Select it in the sidebar
  • Contextual menu > Edit Details
  • Invoke Alfred and search for e.g. “DEVONthink”
  • Drag the result onto the Alfred preference’s window, where it says “Drop Workflow icon here”

A friend on the Alfred forum has just shared this workflow and it seems to be good. See if you like it.:crazy_face:Dropbox - OpenDEVON.alfredworkflow - Simplify your life

Great advice :rofl:

It’s basically the same as my approach with using a fallback search but his uses a keyword which means you’ll have more keystrokes before you can invoke the workflow. A difference of maybe two to three keystrokes each time.

It’s up to you.

2 Likes