Jump to content

how AppleScript interfaces with Alfred?


Recommended Posts

Posted

Novice disclaimer: I'm very new to this so apologies if I misunderstand concepts or use incorrect terms

 

Hello :) 

 

Today I used some AppleScript to interface back into Alfred. I've built a hotkey workflow to quickly launch the "Browse Previous Path" feature:

 

 860896720_ScreenShot2021-01-13at12_17_24pm.thumb.png.5d6de419c99d12335bf38b2dd068e4b1.png

 

on alfred_script(q)
  tell application "Alfred" to search "Previous"
end alfred_script

 

I have a feeling the Key Combo output is not required, and that I could tell Alfred to action the search via the AppleScript. But I don't really understand how AppleScript interfaces with Alfred…

 

Basically, where can I find out what can be done to Alfred via AppleScript? All my search results are mostly about what Alfred does for AppleScript, rather than what AppleScript does for Alfred. 

 

If anyone could give me a little primer about how this works? or nudge me in the right direction?

 

 

 

Posted

Don’t use Run NSAppleScript to run AppleScript code. Use a Run Script action instead, with Language = “/usr/bin/osascript (AS)”.

 

Run NSAppleScript has strange behaviour.

Posted

Thanks @deanishe for the heads up with NSAppleScript. I went through my Workflows and replaced any existing NSAppleScript actions to Run Script.

 

and @Andrew Oh dear... how silly I feel right now 🤦‍♂️. Of course there is a shortcut for this extremely handy function. 

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