Jump to content

Call another workflow within a workflow (just send a command)


Recommended Posts

Posted (edited)

I'm trying to build a workflow for watching movies.  I want to automatically set the volume to 100% and brightness on the main display to 0%.

 

With the Volume Control workflow, I can use "vol 100" to set the volume.

https://github.com/raulchen/alfred-volume-control

 

And with Brightness, I can use "brightness 0" to set the display brightness.

https://github.com/fniephaus/alfred-brightness

 

How can I send these commands within another workflow?  I want to have a single workflow that sends both commands and does some other things.

 

EDIT: Ok, I see I can call other workflows via Applescript if I add an external trigger to them.  However, how do I send a new line character?  For example, I tried to set the brightness to 0 by calling an AppleScript like this:

tell application "Alfred 3" to run trigger "AlfredBrightness" in workflow "com.fniephaus.brightness" with argument "0"

 

However, this brings Alfred up on screen, waiting for me to press enter to proceed.  I also tried this:

tell application "Alfred 3" to run trigger "AlfredBrightness" in workflow "com.fniephaus.brightness" with argument "0

"

 

However, this simply puts the line break character in the Alfred search box instead of pressing Enter.  How do I get it to press enter/send a new line character?

Edited by ptmkenny
research update

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