scripting - How do I open Photoshop projects in Illustrator using Applescript? -


i'm trying write script takes multiple projects have edited in photoshop , opens them in illustrator, makes changes, saves bunch of different ways, , closes project , opens next one. have working except opening photoshop files in illustrator. projects located in same folder tried setting files list using finder , in illustrator opening file. here code:

tell application "finder"     set thefiles files of folder posix file "/volumes/assets/blg.com images/images renaming/photoshop files" list end tell repeat f in thefiles     tell application "adobe illustrator"         activate         open f options {class:photoshop options, preserve hidden layers:true, preserve layers:true} without dialogs         set alllayers layers of document 1         set allimages page items of document 1         repeat lay in alllayers             set visible of lay true         end repeat         repeat img in allimages             set scalematrix scale matrix horizontal scale 416 vertical scale 416             transform img using scalematrix         end repeat         selectobjectsonactiveartboard document 1         delay 2         script "fit artboard selected" "fit artboard"         set visible of layer 2 of document 1 false         set visible of layer 4 of document 1 false         delay 2         script "raw copper save" "rc"         set visible of layer 5 of document 1 false         delay 2         script "architectural copper save" "ar"         set visible of layer 6 of document 1 false         delay 2         script "satin antique save" "sa"         set visible of layer 7 of document 1 false         delay 2         script "brushed nickel save" "bn"         set visible of layer 8 of document 1 false         delay 2         script "polished nickel save" "pn"         set visible of layer 10 of document 1 false         set visible of layer 9 of document 1 false         delay 2         script "antique copper save" "ac"         set visible of layer 11 of document 1 false         delay 2         script "verdigris patina save" "vg"         set visible of layer 12 of document 1 false         delay 2         script "satin verdigris patina save" "sv"         set visible of layer 13 of document 1 false         set visible of layer 2 of document 1 true         delay 2         script "black save" "bk"         set visible of layer 14 of document 1 false         set visible of layer 2 of document 1 false         set visible of layer 15 of document 1 false         delay 2         script "default save" "default"         delay 2         save document 1 in "/volumes/assets/blg.com images/images renaming/illustrator files" illustrator         delay 2         close document 1     end tell end repeat 

currently code opens file in photoshop , not in illustrator confuses me since i'm telling illustrator application open it, not finder. insight here appreciated. been banging head against desk trying figure 1 out.

last try

tell application "finder"     set thefiles files of folder "assets:blg.com images:images renaming:photoshop files" alias list end tell tell application "adobe illustrator"     set user interaction level never interact     activate     set photoshopoptions {class:photoshop options, preserve layers:true, preserve hidden layers:true}     set illustratorpreferences {class:illustrator preferences, photoshop file options:photoshopoptions} end tell repeat f in thefiles     tell application "adobe illustrator"         open f without dialogs         set alllayers layers of document 1   … 

Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -