Recalling scenes from a workflow recently became possible when Savant added the “activateScene” option to scliBridge. The draw back with this method is that the UID of the scene changes each time it is edited by the user.

This means that each time the user edits the scene, the static reference to the scene in an Automator workflow is broken.

The following bash shell script at the end of you workflow, will allow you to reference the scene by a unique name, instead of by UID. This allows the home owner to destroy and recreate the scene as often as they want, without breaking the state trigger/workflow, so long as they re-use the same unique name for the scene each time.

sceneName="Welcome"
sceneOwner="integrate"

if [ "$(uname)" = "Linux" ]; then
	pathToSCLI="/usr/local/bin/sclibridge"
else
	pathToSCLI="${HOME}/Applications/RacePointMedia/sclibridge"
fi

sceneUID=$(${pathToSCLI} getSceneNames | grep -i "$sceneName" | grep -i "$sceneOwner" | cut -d',' -f2)

echo "sceneName = $sceneName"
echo "sceneUID = $sceneUID"
echo "sceneOwner = $sceneOwner"

${pathToSCLI} activateScene "$sceneName" "$sceneUID" "$sceneOwner"

Log In