Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

205
Vistas
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;
}
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

The input to an Automator action is an array, so you will need to step through the array or convert/coerce to whatever class you are wanting to work with. In your posted script, the replace() method is for a string, so you are getting an error trying to use that method on the input array.

If you just want a single input item you can use input[0] to get the first item in the array, or input.join() to join the array items together.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda