'Use Automator App Variables as imput for Javascript action steps
I am trying to input the content of a variable generated with the Automator app onto the next action step, to define the value of a javascript script variable. Change the variable using javascript code and push the result further to the next action step. Then turn it back into an Automator variable, or update the one previously used as input. I am sure you will find it as a simple thing, but I couldn't find a way to get it working. This question might be silly, after all. Many thanks in advance. Check the screenshot of the Automator sequence of steps. Screenshot of the actions set in Automator App
function run(input) {
var str = input;
var l1 = str.replace(/ /g, "_");
str = l1;
var l2 = str.replace(/:/g, "-");
return l2;
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|