Jump to content

Run Alfred 5 workflow through AppleScript within Alfred 5 workflow.


Recommended Posts

Hello, everyone! Is it possible to run Alfred 5 workflow through AppleScript within Alfred 5 workflow?

 

I have a workflow with script and I need something like this, but I don't know how to do it.

 

on run argv
    tell application "Tunnelblick"         set VPN to (get state of configurations)         if VPN contains "CONNECTED" then
        else
            tell application "Alfred" to run the workflow named "Test"         end if
    end tell end run

 

Thanks!

 

Link to comment

I was interested to take a look at this. Try adding to your target workflow an External trigger object in Alfred. When you complete the identifier for the trigger sample AppleScript will appear showing you how to call that trigger using AppleScript. The code will look something like this:

 

tell application id "com.runningwithcrayons.Alfred" to run trigger "[name of trigger]" in workflow "[bundle identifier of target workflow]"

 

Stephen

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