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

254
Vistas
How can I run a photoshop script from python program?

I have a photoshop script that is used to count the number of pictures open in photoshop.

I want to execute this script from python.

Anyone, please help me.

Thank you

// target photoshop

s2t = stringIDToTypeID;

var len = getPropertyDesc('application', p = 'numberOfDocuments').getInteger(s2t(p)),
    result = { v: 0, h: 0 };

for (var i = 1; i <= len; i++) {
    var ratio = getPropertyDesc('document', p = 'width', i).getDouble(s2t(p)) >= getPropertyDesc('document', p = 'height', i).getDouble(s2t(p));
    result[ratio ? 'h' : 'v']++
}

alert(result['v'] + 'v' + result['h'] + 'h')

function getPropertyDesc(target, property, idx) {
    target = s2t(target);
    (r = new ActionReference()).putProperty(s2t('property'), s2t(property));
    idx ? r.putIndex(target, idx) : r.putEnumerated(target, s2t('ordinal'), s2t('targetEnum'));
    return executeActionGet(r);
}

about 4 years ago · Juan Pablo Isaza
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