Jump to content

Pre-defined list of Apps to open in a Script Filter?


Recommended Posts

I've looked at the Help pages and the Getting Started examples, I've been searching online for hours now and can't quite find what I'm looking for.

Surely I'm missing something obvious because what I'm trying build isn't that complex.

 

I just want a pre-defined list of Apps (that are on my computer) and when you select one, it opens it.

Very similar to how Alfred's basic functionality works but restricted to a few set of apps.

 

All the examples I've seen are file references or URL references

I'm not sure where to look

Link to comment

I looked into List Filters but I wasn't sure how to inherit the App Icon from the App I want to launch.

Let's say it's Chrome, I can put the Title as Chrome but the icon would be blank.

 

Another caveat is that it be nice to be able to search the results. For example, typing 'c' would filter the list and show "Chrome"

Is that possible with a List Filter?

Link to comment
Just now, jwm said:

For example, typing 'c' would filter the list and show "Chrome"

Is that possible with a List Filter?

Yes—set it up "with space” and "argument optional”.

 

As to icons, you may be able to copy them by doing ⌘I (for "information”) on the app in Finder and copying them from there. It has worked for me before. (There are doubtless other more complex ways of obtaining app icons.)

 

Stephen

Link to comment

Thanks for the help!

 

I managed to pull the icons by literally dragging the App from Finder into the Icon box. Easy PZ

I had to put in a Conditional for each App Launcher in order to Launch the particular App depending on the argument provided in the List Filter.

 

Works great and is filterable too!

Thanks!

Link to comment

If you want to be able to do more advanced searching (eg using the "match" JSON key) then you should try to use a Script Filter. You can use any language that you want:  Bash, jq, Python, Ruby, Go, JXA... Another benefit of a Script Filter is that you can source the icon directly from the App, and it will stay updated without needing to copy/paste.

 

It's late but if you need a simple example I am happy to make one and post it tomorrow.

Link to comment
On 5/18/2024 at 12:29 AM, luckman212 said:

If you want to be able to do more advanced searching (eg using the "match" JSON key) then you should try to use a Script Filter. You can use any language that you want:  Bash, jq, Python, Ruby, Go, JXA... Another benefit of a Script Filter is that you can source the icon directly from the App, and it will stay updated without needing to copy/paste.

 

It's late but if you need a simple example I am happy to make one and post it tomorrow.

 

I would actually super appreciate an example if you have the time!

It was super difficult to find something relevant :x

Link to comment

You don’t have to use Python. As Luke pointed out, you can use whatever language you want. Or you can do it manually with a List Filter. You didn’t need the conditional you mentioned above, you could’ve instead added the app’s path in the Arg section. Or keep the name but connect it to the Open Apps Automation Task instead, which is geared for more flexibility. There are many possible ways to go about it, with or without code.

Link to comment

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...