Closed NeighNeighNeigh closed 7 months ago
This would entail the following:
My belief is that this approach would be both fairly slow and sometimes unreliable.
Currently, you can invoke rf and give it a file extension and it will use Alfred's built-in filtering capability to narrow down results. It's also interactive, so you can change/update the extension and get a different result set.
Here's an example situation: a user wants to open up an image for editing with the default image editing software.
This existing functionality is more reliable, more flexible, and definitely speedier from a user perspective than anything I could come up with.
Now, a drawback is that this doesn't provide the reverse lookup kind of functionality that you might be looking for. That is, you might have many different file formats associated with your chosen image editing software (Preview or Gimp or whatever), and you'd like to find all the files that Preview, say, can open/edit. My thought is that if you know you want to invoke Preview it's probably best to invoke it and use its File -> Open Recent menu to select recently-opened files. Gimp and other programs have similar functionality, I would guess.
Sadly, this doesn't help you if you haven't opened the file in the program recently, but I think the existing filtering by file association method I described above solves that problem--although it puts the burden on the user to know what file extensions go with what applications.
Thank you for this very instructive response. While I am disappointed it isn't some trivial addition (which would be a nice feature) - I understand and agree that implementing a solution that might be flakey should be avoided. Regardless, I use RF daily and love the time it saves me, thank you for your work
I have cobbled together a solution that works well, though requires some initial setup. I have added an external trigger to your workflow. Now in my own separate workflow I add each of my primary apps as Hotkey triggers. Utilising Alfreds 'related apps' feature, the same hotkey will follow different paths, depending on which app is foreground. Each path has an Arg and Vars utility where I set "EXTENSIONS" to the extensions for that app. Finally, this runs into a Call External Output which invokes your workflow, with the new "EXTENSIONS" variable passed through.
Wow, that is ingenious! I never would have thought of that. I am glad that this appears to have solved your problem.
As an aside, I am sorry that it has taken me so long to get back to you on this. I have just started a new job and the time I have for other projects has been severely limited, at least for now. I am happy that you find the workflow helpful, and again I applaud your ingenuity.
Would it be possible to have the workflow launch in an alternative mode where it checks the current foreground app and will only return recent files whose filetype is associated with that app?