[AS] Scripting Illustrator CS5

Page principale
Supprimer ce message
Répondre à ce message
Auteur: AppleScript
Date:  
À: applescript_fr
Sujet: [AS] Scripting Illustrator CS5
Bonjour toutes/tous,

Le script ci-dessous fonctionne mais...

1. Mes fichiers de départ sont en RGB.
Je dois changer d'espace colorimétrique.
Dans Illustrator Fichier > Mode colorimétrique du document > Couleurs CMJN
et c'est fait.
Mais je n'arrive pas à scripter cette fonction.

2. Je veux dessiner des marges
Je crée un rectangle aux bonnes coordonnées (by the way, je n'ai pas
trouvé comment indiquer les mesures en mm, mais ça marche)
Je dois ensuite transformer ce rectangle en repères
Dans Illustrator Affichage > Repères > Créer les repères et c'est fait.
Mais je n'arrive pas non plus à scripter cette fonction.

Merci à celles et ceux qui voudront bien se pencher sur mon problème.
Bon dimanche.

Raymond Studer.

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

tell application "Adobe Illustrator"
    activate
    -- verification de l'ouverture préalable d'un document
    if (count every document) > 0 then
        -- set the color mode of current document to CMYK (not working)
        -- set properties of document 1 to {color mode:CMYK} (also not working)
        set layerRef to make layer at document 1 with properties {name:"Cadrage"}
        -- NB 200 dans la commande ci-dessous = 70,556 mm
        set theRectanglePath to make new rectangle at beginning of document 1 ¬
            with properties {position:{85.0388344, -85.0388344}, height:671.811,
width:425.196}
        -- Ce rectangle doit être transformé en repères (comment ?)
        move layer 2 of document 1 to before layer 1 of document 1
        set layerRef to make layer at document 1 with properties
{name:"Aplats_25"}
        set layerRef to make layer at document 1 with properties
{name:"Aplats_45"}
        set layerRef to make layer at document 1 with properties
{name:"Filets_60"}
        set NewColor to {cyan:0.0, magenta:2.0, yellow:0.0, black:68.0}
        make new spot in document 1 with properties ¬
            {name:"PANTONE Cool Gray 11 C", color:NewColor, color type:spot color}
    else
        display alert "Ouvrez d'abord un document avant de lancer ce script"
    end if
end tell


_______________________________________________
Applescript_fr mailing list
Applescript_fr@???
http://listes.patpro.net/mailman/listinfo/applescript_fr