IPB

Bienvenue invité ( Connexion | Inscription )

> AUTOMATOR > APPLE SCRIPT > PB ALIAS
Options
Pierre Corne
posté 3 Oct 2019, 17:37
Message #1


Nouveau Membre


Groupe : Membres
Messages : 1
Inscrit : 3 Oct 2019
Membre no 209 044



Bonjour,

Avec AUTOMATOR et l'exécution d'un script APPLESCRIPT ci-dessous, j'ai le massage suivant :
Erreur dans Adobe Photoshop CC 2019 : Le fichier un objet quelconque est introuvable.

Voici le code :
-----------------------------------------

Code
say "Choose your Master Folder for this batch job" using "Victoria"
set raw_folder to choose folder
say "Choose your destination Folder for the processed files" using "Victoria"
set live_folder to choose folder
set startTime to time of (current date)
set fileCounter to 0
    tell application "Finder"
        set itemList to files in raw_folder
    end tell
repeat with j from 1 to (number of itemList)
    set fileCounter to fileCounter + 1
end repeat

repeat with an_item in itemList
    tell application "Finder"
        set current to an_item as alias
    end tell

    tell application "Adobe Photoshop CC 2019"
        activate
        open current
        set this_image to current document
        do action "PHOTOS LDT" from "PHOTOS LDT"

        tell current document
            save as JPEG in live_folder
            close
        end tell
    end tell
end repeat

set endTime to time of (current date)
say "The job is done, please have a look to the destination folder. The operation took " & endTime - startTime & " seconds. The directory contains " & fileCounter & " files." using "Victoria"

-----------------------------------------

La variable current ne semble pas définie.
Sur des systèmes plus ancien que macOS Mojave ce script fonctionne, mais pas sur le système pré-cité.
Avez-vous des solutions à me proposer.

Bien cordialement
Raison de l'édition : Ajout de balises CODE
Go to the top of the page
 
+Quote Post

Les messages de ce sujet


Reply to this topicStart new topic
1 utilisateur(s) sur ce sujet (1 invité(s) et 0 utilisateur(s) anonyme(s))
0 membre(s) :

 



Nous sommes le : 18th July 2025 - 09:29