sosaveme Posted April 25, 2023 Share Posted April 25, 2023 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
Stephen_C Posted April 25, 2023 Share Posted April 25, 2023 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
sosaveme Posted April 25, 2023 Author Share Posted April 25, 2023 Thanks you very much! It's seems to be working. Link to comment
Stephen_C Posted April 25, 2023 Share Posted April 25, 2023 Good: happy to have helped. Stephen Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now