Jump to content

How to open Alfred with argument passed from external trigger?


Recommended Posts

I want to make a workflow where I trigger an external trigger and pass in a path like ~/Users/nikivi/ in there.

 
However I can't seem to do that. Essentially I want something like this :

 

EJCiD3E.png 


But instead of hotkey trigger, trigger it externally and pass in text to Alfred.

Edited by nikivi
Link to comment

That sample applescript doesn't matter for me though.


Because I call them with Applescript like this after :


tell application "Alfred 3" to run trigger "duckduckgo" in workflow "net.deanishe.alfred-searchio" with argument "ducks"
 

My question was whether I could pass this argument directly to Alfred.

Edited by nikivi
Link to comment

Right. Because you originally said External Trigger:

 

2 hours ago, nikivi said:

I want to make a workflow where I trigger an external trigger and pass in a path like ~/Users/nikivi/ in there.

 

 

As you noticed, entering ~ does the same thing. So your AppleScript should be: tell application "Alfred 3" to search "~".

 

It's more portable. Shouldn't hardcode paths without a very good reason.

 

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