Photoshop applescript

Could anybody help me ?
What I want to do : I want to run a batch action for every file from a selected folder, creating (or at least pointing to) another folder as a destination.
I tried to read the apple scripting reference for photoshop but couldn't make it. There are no samples to figure how it works.
That's what I tried without sucess ...
set pasta_origem to choose folder with prompt "Select original folder:"
set pasta_destino to choose folder with prompt "Select target folder:"
tell application "Adobe Photoshop CS4"
    activate
    batch "13 x 19 + sharpen" from "Ações CFotos" from files list of pasta_origem with options destination folder pasta_destino
    error file
    override save
    windows compatible
end tell
Any help would be really usefull.
Tks !

Hi,
Here is an example
set pasta_origem to choose folder with prompt "Select original folder:"
set pasta_destino to choose folder with prompt "Select target folder:"
set fileToLog to (pasta_destino as string) & "Photoshop_Batch_Errors_Log.txt"
tell application "Finder"
      set PhotoshopFiles to document files of pasta_origem as alias list
      if not (exists file fileToLog) then
            make new file at pasta_destino with properties {name:"Photoshop_Batch_Errors_Log.txt"}
      end if
end tell
tell application "Adobe Photoshop CS4"
      activate
      batch "13 x 19 + sharpen" from "Ações CFotos" from files PhotoshopFiles with options {destination:folder, destination folder:pasta_destino, error file:alias fileToLog, windows compatible:true, file naming:{document name lower, extension lower}, suppress open:true, override save:true}
end tell
Important : override save:true When this option is true, files will be saved to the destination folder only by “save as” steps in the action "13 x 19 + sharpen". If there are no “save” or “save as” steps, no files will be saved, in this case set it to false or remove ,override save:true in options .

Similar Messages

  • Photoshop Applescript, select a layer and fill?

    How do I select a layer than I have named "BACKGROUND"
    Then fill with White,
    then select layer "Main Image"
    within Photoshop?
    Many Thanks
    Matt

    Hi,
    Here is an example :
    tell application "Adobe Photoshop CS5"
          tell current document
                deselect -- deselect all in the document
                set current layer to layer "BACKGROUND" -- select
                tell current layer to if not visible then set visible to true -- must be visible to fill
                --- fill the current layer with White , adjust (blend mode, opacity and preserving transparency)
                fill selection with contents {class:RGB color, red:255, green:255, blue:255} blend mode normal opacity 100 without preserving transparency
                set current layer to layer "Main Image" -- select
          end tell
    end tell

  • Applescript Photoshop batch

    Hello !
         I'm trying to make an applescript that will run a batch procedure in photoshop and I don't know how to write its code. Let me show my script :
    set pasta_evento to choose folder with prompt "Select folder of the event: "
    set pasta_tratadas to (pasta_evento as string) & "Tratadas:" as alias
    set arq_log to (pasta_evento as string) & "Log_Erros.txt"
    tell application "Finder"
              if not (exists file arq_log) then
      make new file at pasta_evento with properties {name:"Log_Erros.txt"}
              end if
    end tell
    set Fotos to files of pasta_evento as alias list
    tell application "Adobe Photoshop CS6"
      activate
                                  set display dialogs to never
                                  batch "13 x 19 + sharpen" from files Fotos  from "My Actions" with options {destination:folder, destination folder:pasta_tratadas, error file:alias arq_log}
    end tell
    When I run it, Photoshop opens a dialog informing : "There were no source files that could be opened by Photoshop".
    I realized that if I change the instruction as below, it works. So, there's something wrong with the variable Fotos - I tried to feed it with strings but didn't know how to do it.
    tell application "Adobe Photoshop CS6"
      activate
                                  set display dialogs to never
                                  batch "13 x 19 + sharpen" from files {"Disk:Users:Me:Pictures:Macros:Tratadas:0002.JPG", "Disk:Users:Me:Pictures:Macros:Tratadas:0025.JPG"} from "My Actions"
    When I run the same script with the batch, Photoshop says there's something wrong with the batch command. I tried to read the photoshop applescript ref, but I don't know what's wrong.
    Could anybody help me correct this code ? I'm not definetively an expert!
    Some refs about batch and batch options :
    batch v : run the batch automation routine
    batch text : the name of the action to play (note that the case of letters in the Action name is important and must match the case of the name in the Actions palette)
    from files list of alias : list of input files to operate on
    from text : the name of the action set containing the action being played (note that the case of letters in the Action Set name is important and must match the case of the name in the Actions palette)
    [with options batch options] : options for Batch
    batch options n : options for the Batch command
    properties
    destination (folder/none/save and close) : final destination of processed files ( default: none )
    destination folder (alias) : folder location when using destination to a folder
    error file (alias) : file to log errors encountered, leave this blank to stop for errors
    file naming (list of ddmm/ddmmyy/document name 3/document name lower/document name mixed/extension lower/extension upper/mmdd/mmddyy/serial letter lower/serial letter upper/serial number four/serial number one/serial number three/serial number two/yyddmm/yymmdd/yyyymmdd) : list of file naming options 6 max.
    macintosh compatible (boolean) : make final file name Macintosh compatible ( default: true )
    override open (boolean) : override action open commands ( default: false )
    override save (boolean) : override save as action steps with destination specified here ( default: false )
    startingserial (integer) : starting serial number to use ( default: 1 )
    suppress open (boolean) : suppress file open options dialogs ( default: false )
    suppressprofile (boolean) : suppress color profile warnings ( default: false )
    unix compatible (boolean) : make final file name Unix compatible ( default: true )
    windows compatible (boolean) : make final file name Windows compatible ( default: true )
    Tks !

    List of files must be not an alias, but a text string.
    Adding something like that to your code must help:
      set PhotoshopFiles to files of folder_to_run as alias list
      set FileNames to {}
      repeat with i from 1 to the count of PhotoshopFiles
           set current_file to item i of PhotoshopFiles
           copy current_file as text to the end of FileNames
      end repeat
      tell application "Adobe Photoshop CS6"
           activate
           try
                set Batch_Options to {class:batch options, destination:save and close, error file:Error_File, file naming:{document name lower, extension lower}, macintosh compatible:true, override open:false, override save:true, suppress open:true, suppressprofile:true, unix compatible:true, windows compatible:true}
                batch script_name from files FileNames from action_set_name with options Batch_Options
           end try
      end tell

  • How to use applescript photoshop batch

    Hello, good afternoon.
         I'm trying to make an applescript that will run a batch procedure in photoshop and I don't know how to wirte its code. Let me show my script :
    set pasta_evento to choose folder with prompt "Select folder of the event: "
    set pasta_tratadas to (pasta_evento as string) & "Tratadas:" as alias
    set arq_log to (pasta_evento as string) & "Log_Erros.txt"
    tell application "Finder"
              if not (exists file arq_log) then
      make new file at pasta_evento with properties {name:"Log_Erros.txt"}
              end if
    end tell
    set Fotos to files of pasta_evento as alias list
    tell application "Adobe Photoshop CS6"
      activate
                                  set display dialogs to never
                                  batch "13 x 19 + sharpen" from files Fotos  from "My Actions" with options {destination:folder, destination folder:pasta_tratadas, error file:alias arq_log}
    end tell
    I think I have two problems. I realized that if I change the instruction as below, it works. So, there's something wrong with the variable Fotos and with the batch options (I tried to read the photoshop applescript ref, but I don't know what's wrong.
    tell application "Adobe Photoshop CS6"
      activate
                                  set display dialogs to never 
                                  batch "13 x 19 + sharpen" from files {"Disk:Users:Me:Pictures:Macros:Tratadas:0002.JPG", "Disk:Users:Me:Pictures:Macros:Tratadas:0025.JPG"} from "My Actions"
    Could anybody help me correct this code ? I'm not definetively an expert!
    Tks !

    Hi Muppet, tks for the help !
         I tried to feed it strings by many ways friend, but I as I told you I'm not an expert and couldn't make it work... So sad ...
         When I run :
    batch "13 x 19 + sharpen" from files Fotos  from "My Actions"
    In  the results it comes :
    batch "13 x 19 + sharpen" from files {alias "Disk:Users:Me:Pictures:Macros:Tratadas:0002.JPG", alias "Disk:Users:Me:Pictures:Macros:Tratadas:0025.JPG"} from "My Actions"
    And it doesn't work, Photoshop opens a dialog informing : There were no source files that could be opened by Photoshop.
    When I write the alias list manually it starts the batch command.
    batch "13 x 19 + sharpen" from files {"Disk:Users:Me:Pictures:Macros:Tratadas:0002.JPG", "Disk:Users:Me:Pictures:Macros:Tratadas:0025.JPG"} from "My Actions"
    In the Applescript Photoshop Ref:
    batch v : run the batch automation routine
    batch text : the name of the action to play (note that the case of letters in the Action name is important and must match the case of the name in the Actions palette)
    from files list of alias : list of input files to operate on
    from text : the name of the action set containing the action being played (note that the case of letters in the Action Set name is important and must match the case of the name in the Actions palette)
    [with options batch options] : options for Batch
    AND
    batch options n : options for the Batch command
    properties
    destination (folder/none/save and close) : final destination of processed files ( default: none )
    destination folder (alias) : folder location when using destination to a folder
    error file (alias) : file to log errors encountered, leave this blank to stop for errors
    file naming (list of ddmm/ddmmyy/document name 3/document name lower/document name mixed/extension lower/extension upper/mmdd/mmddyy/serial letter lower/serial letter upper/serial number four/serial number one/serial number three/serial number two/yyddmm/yymmdd/yyyymmdd) : list of file naming options 6 max.
    macintosh compatible (boolean) : make final file name Macintosh compatible ( default: true )
    override open (boolean) : override action open commands ( default: false )
    override save (boolean) : override save as action steps with destination specified here ( default: false )
    startingserial (integer) : starting serial number to use ( default: 1 )
    suppress open (boolean) : suppress file open options dialogs ( default: false )
    suppressprofile (boolean) : suppress color profile warnings ( default: false )
    unix compatible (boolean) : make final file name Unix compatible ( default: true )
    windows compatible (boolean) : make final file name Windows compatible ( default: true )
    When I try to use the batch options Photoshop it says the batch command is invalid or not supported.
    With these informations do you could help me ?
    I'm loosing my hopes ...
    Tks !

  • Aim to process all files in folders on desktop to run through photoshop and save in multiple locations

    Aim to process all files in folders on desktop to run through photoshop and save in multiple locations
    Part one:-
    Gather information from desktop to get brand names and week numbers from the folders
    Excluding folders on desktop beginning with "2" or "Hot"
    Not sure about the list of folders
    but I have got this bit to work with
    set folderPath to "Hal 9000:Users:matthew:Desktop:DIVA_WK30_PSD" --<<this would be gained from the items on the desktop
    set {oldTID, my text item delimiters} to {my text item delimiters, ":"}
    set folderName to last text item of folderPath
    set my text item delimiters to "_WK"
    set FolderEndName to last text item of folderName
    set brandName to first text item of folderName
    set my text item delimiters to "_PSD"
    set weekNumber to first text item of FolderEndName
    set my text item delimiters to oldTID
    After running this I have enough information to create folders in multiple locations, (i need to know where they are so that photoshop can later save them in those multiple locations
    So I need the following folders created
    Locally
    Hal 9000:Users:matthew:Pictures:2011-2012:"WK" + weekNumber
    Hal 9000:Users:matthew:Pictures:2011-2012:"WK" + weekNumber: brandName
    Hal 9000:Users:matthew:Pictures:2011-2012:"WK" + weekNumber: brandName: brandName + "_WK" + weekNumber + "_LR" --(Set path for Later)PathA
    Hal 9000:Users:matthew:Pictures:2011-2012:"WK" + weekNumber: brandName: brandName + "_WK" + weekNumber + "_HR"--(Set path for Later)PathB
    Network
    Volumes:GEN:Brands:Zoom:Brands - Zoom:Upload Photos:2012:"Week" + weekNumber
    Volumes:GEN:Brands:Zoom:Brands - Zoom:Upload Photos:2012:"Week" + weekNumber:brandName + "_WK" + weekNumber + "_LR"  --(Set path for Later)PathC
    Volumes:GEN:Website_Images --(no need to create folder just set path)PathD
    FTP (Still as a normal Volume) So like another Network
    Volumes:impulse:"Week" + weekNumber
    Volumes:impulse:"Week" + weekNumber:Brand
    Volumes:impulse:"Week" + weekNumber:Brand:brandName + "_WK" + weekNumber + "_LR"  --(Set path for Later)PathE
    Volumes:impulse:"Week" + weekNumber:Brand:brandName + "_WK" + weekNumber + "_HR"  --(Set path for Later)PathF
    I like to think that is end of Part 1
    Part 2
    Take the images  (PSD's) from those folders relevant to the Brand then possibly run more applescript that opens flattens and then saves it in the locations above.
    For example….
    An image in folder DIVA_WK30_PSD will then run an applescript in Photoshop, lets call it DivaProcessImages within this we then save to PathA, PathB, PathC, PathD, PathE, PathF the folder path of C should therefore look like this
    Volumes:GEN:Brands:Zoom:Brands - Zoom:Upload Photos:2012:Week30:DIVA_WK30_LR and of course save the image as original filename.
    Then from the next folder
    An image in folder Free_WK30_PSD will then run an applescript in Photoshop, lets call it FreeProcessImages within this we then save to PathA, PathB, PathC, PathD, PathE, PathF the folder path of C should therefore look like this
    Volumes:GEN:Brands:Zoom:Brands - Zoom:Upload Photos:2012:Week30:Free_WK30_LR and of course save the image as original filename.
    The photoshop applescript i'm hoping will be easier as it should be a clearer step by step process without any if's and but's
    Now for the coffee!!

    Hi,
    MattJayC wrote:
    Now to the other part, where each folder was created (and those that already existed) how do I set them as varibles?
    For example,
    set localBrandFolder_High_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_HR", localBrandFolder)
    This line was used to create more than one folder as it ran though the folders on the desktop. The next part is I will need to reference them to save files to them.
    You can use a records
    Examples
    if you want the path of localBrandFolder_High_Res  of "Diva", if "Diva" is the second folder of the Desktop
    You get the path with this : localBrandFolder_High_Res of record 2 of myRecords
    if you want the path of localWeekFolder  in the first folder of the Desktop
    You get the path with this : localWeekFolder of record 1 of myRecords
    Here is the script
    set myRecords to {}
    set dtF to paragraphs of (do shell script "ls -F ~/Desktop | grep '/' | cut -d'/' -f1")
    repeat with i from 1 to number of items in dtF
        set this_item to item i of dtF
        if this_item does not start with "2_" and this_item does not start with "Hot" then
            try
                set folderPath to this_item
                set {oldTID, my text item delimiters} to {my text item delimiters, ":"}
                set folderName to last text item of folderPath
                set my text item delimiters to "_WK"
                set FolderEndName to last text item of folderName
                set brandName to first text item of folderName
                set my text item delimiters to "_PSD"
                set weekNumber to first text item of FolderEndName
                set my text item delimiters to oldTID
            end try
            try
                set this_local_folder to "Hal 9000:Users:matthew:Pictures:2011-2012"
                set var1 to my getFolderPath("WK" & weekNumber, this_local_folder)
                set var2 to my getFolderPath(brandName, var1)
                set var3 to my getFolderPath(brandName & "_WK" & weekNumber & "_LR", var2)
                set var4 to my getFolderPath(brandName & "_WK" & weekNumber & "_HR", var2)
                --set up names to destination folders and create over Netwrok including an already exisiting folder
                set this_Network_folder to "DCKGEN:Brands:Zoom:Brand - Zoom:Upload Photos:2012:"
                set var5 to my getFolderPath("WK" & weekNumber, this_Network_folder)
                set var6 to my getFolderPath(brandName, var5)
                set var7 to my getFolderPath(brandName & "_WK" & weekNumber & "_LR", var6)
                set website_images to "DCKGEN:Website_Images:"
                --set up names to destination folders and create over Netwrok for FTP collection (based on a mounted drive)
                set this_ftp_folder to "Impulse:"
                set var8 to my getFolderPath("Week" & weekNumber, this_ftp_folder)
                set var9 to my getFolderPath(brandName, var8)
                set var10 to my getFolderPath(brandName & "_WK" & weekNumber & "_LR", var9)
                set var11 to my getFolderPath(brandName & "_WK" & weekNumber & "_HR", var9)
                set end of myRecords to ¬
      {localWeekFolder:var1, localBrandFolder:var2, localBrandFolder_Low_Res:var3, localBrandFolder_High_Res:var4, networkWeekFolder:var5, networkBrandFolder:var6, networkBrandFolder_Low_Res:var7, ftpWeekFolder:var8, ftpBrandFolder:var9, ftpBrandFolder_Low_Res:var10, ftpBrandFolder_High_Res:var11}
            end try
        end if
    end repeat
    localBrandFolder_High_Res of record 2 of myRecords -- get full path of localBrandFolder_High_Res in the second folder of Desktop
    on getFolderPath(tName, folderPath)
        tell application "Finder" to tell folder folderPath
            if not (exists folder tName) then
                return (make new folder at it with properties {name:tName}) as string
            else
                return (folder tName) as string
            end if
        end tell
    end getFolderPath

  • How to Attach Script to Photoshop Action or Folder?

    I'm not familiar with Applescript at all! However, I downloaded a script for use with Photoshop which crops an image to a specific format. It works great if I've got an image open in Photoshop.
    What I can't figure out how to do is to either apply that script to an entire folder to process all images in that folder, or better yet, record a Photoshop Action that uses that script.
    How can I use that script to do a batch process from either Photoshop or the Finder?
    Thanks for any help for this total newbie.

    The Mac I am currently using does not have 'Adobe Photoshop CS3' installed. However, based on [1], the code samples should work. Some editing may be needed, based on your specific requirements.
    Sample code01:
    -- Code starts here --
    on run ()
    my handle_Items(choose folder with multiple selections allowed)
    end
    on open (dItems)
    my handle_Items(dItems)
    end
    on handle_Items(tItemss)
    tell application "Adobe Photoshop CS3"
    repeat with i in tItemss
    set fList to list folder i without invisibles
    repeat with j in fList
    try
    open file ((i as string) & j)
    try
    set docRef to current document
    set (docWidth,docHeight) to (width of docRef,height of docRef)
    set minDimension to docWidth
    if docWidth > docHeight then set minDimension to docHeight
    crop docRef bounds {(docWidth - minDimension) / 2, (docHeight - minDimension) / 2, (docWidth + minDimension) / 2, (docHeight + minDimension) / 2}
    save current document
    close current document saving no
    end try
    end try
    end repeat
    end repeat
    end tell
    end handle_Items
    -- Code ends here --
    Save the code as an application (AppleScript 'applet').
    You and then either double click on the applet - and navigate to and select a desired folder (or folders), of which its / their contents will be processed; or, you can drag a folder (or folders) onto the applet, of which the folders contents will be processed.
    Code sample02:
    -- Code starts here --
    on adding folder items to tFolder after receiving tItems
    tell application "Adobe Photoshop CS3"
    repeat with i in tItems
    try
    open file (i as string)
    try
    set docRef to current document
    set (docWidth,docHeight) to (width of docRef,height of docRef)
    set minDimension to docWidth
    if docWidth > docHeight then set minDimension to docHeight
    crop docRef bounds {(docWidth - minDimension) / 2, (docHeight - minDimension) / 2, (docWidth + minDimension) / 2, (docHeight + minDimension) / 2}
    save current document
    close current document saving no
    end try
    end try
    end repeat
    end tell
    end adding folder items to
    -- Code ends here --
    See 'Folder Actions Reference' about AppleScript Folder Actions; and, 'Running an automation when a folder is changed' for attaching an AppleScript Folder Action.
    [1] - Consult 'photoshopcs3_applescriptref.pdf' for Adobe Photoshop AppleScript classes and commands.

  • How do I use Actionmanager code to change just the contents of a line of text?

    The quick question - can anyone provide me with Action Manager code that will simply change the contents of a text field in Photoshop CS6?
    The long version, if anyone wants to know:
    I'm a reasonably experienced Applescripter with hundreds of Illustrator and Photoshop applescripts, but I don't know javascript at all.
    I have a script I'm doing currently that just deletes, changes the visibility, and/or changes the text contents of a whole bunch of layers.
    It's running just fine in Applescript, except it runs slower than molasses. I went to so much work to automate this stuff - the script's 750 lines with all the logic - and users are telling me that they can do this by hand in the time the script runs. It really does take as long as a minute, which just feels painful. It deletes about 25 layers, changes the text contents of up to 5 layers, and changes the visibility of maybe 2 to 24 layers.
    I tested the logic parts and they're near instantaneous. Replacing all of that and just plugging in static dummy values for the variables, and the Photoshop updates yield the same speed. For some reason, just telling Photoshop to do these things - feeding it a list of layers to delete and text to change, just takes it forever. Just a bunch of lines like: delete layer [whatever] of layer [whatever] of layer [whatever] or:
    set the contents of text object of art layer "Name" of layer set "Editable Text" of layer set "Header Elements" to "Some Text:" & someVariableText
    So I've been taking out the Photoshop calls in Applescript, and replacing them with calls to subroutines that replay Action Manager code I got from Scripting Listener and then plugging in the relevant variables.
    So far so good on the deleting layers, that part runs 20x faster now.
    On the text layer part - scripting listener records 1,011 lines of code when I change just the contents of a text field.
    What's recorded has everything about the appearance baked in. With Applescript, I could set the contents of a text field only, leaving the existing formatting, which was really handy. But if I use a call to my scripting listener code here, I'm going to have to save a different 1,000 line subroutine function for every text style of a text field I want to change, and then the script will be horribly non-future-proof.
    Not knowing Javascript, trying to deconstruct the 1,011 line monstrosity Scripting Listener spits out to get to something that just changes the character contents of the text field is not happening. I tried a bit, but it's way over my head.
    Thanks in advance for any help. Scripting listener output pasted below, in case it's helpful. The only line that's relevant to what I'm trying to accomplish - meaning the only line I'll be replacing with my own variable, is line 13:
            desc6.putString( idTxt, """This is the text I entered.\rFor the this text field.""" );
    var idsetd = charIDToTypeID( "setd" );
        var desc5 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
            var ref5 = new ActionReference();
            var idTxLr = charIDToTypeID( "TxLr" );
            var idOrdn = charIDToTypeID( "Ordn" );
            var idTrgt = charIDToTypeID( "Trgt" );
            ref5.putEnumerated( idTxLr, idOrdn, idTrgt );
        desc5.putReference( idnull, ref5 );
        var idT = charIDToTypeID( "T   " );
            var desc6 = new ActionDescriptor();
            var idTxt = charIDToTypeID( "Txt " );
            desc6.putString( idTxt, """This is the text I entered.\rFor the front inks.""" );
            var idwarp = stringIDToTypeID( "warp" );
                var desc7 = new ActionDescriptor();
                var idwarpStyle = stringIDToTypeID( "warpStyle" );
                var idwarpStyle = stringIDToTypeID( "warpStyle" );
                var idwarpNone = stringIDToTypeID( "warpNone" );
                desc7.putEnumerated( idwarpStyle, idwarpStyle, idwarpNone );
                var idwarpValue = stringIDToTypeID( "warpValue" );
                desc7.putDouble( idwarpValue, 0.000000 );
                var idwarpPerspective = stringIDToTypeID( "warpPerspective" );
                desc7.putDouble( idwarpPerspective, 0.000000 );
                var idwarpPerspectiveOther = stringIDToTypeID( "warpPerspectiveOther" );
                desc7.putDouble( idwarpPerspectiveOther, 0.000000 );
                var idwarpRotate = stringIDToTypeID( "warpRotate" );
                var idOrnt = charIDToTypeID( "Ornt" );
                var idHrzn = charIDToTypeID( "Hrzn" );
                desc7.putEnumerated( idwarpRotate, idOrnt, idHrzn );
            var idwarp = stringIDToTypeID( "warp" );
            desc6.putObject( idwarp, idwarp, desc7 );
            var idtextGridding = stringIDToTypeID( "textGridding" );
            var idtextGridding = stringIDToTypeID( "textGridding" );
            var idNone = charIDToTypeID( "None" );
            desc6.putEnumerated( idtextGridding, idtextGridding, idNone );
            var idOrnt = charIDToTypeID( "Ornt" );
            var idOrnt = charIDToTypeID( "Ornt" );
            var idHrzn = charIDToTypeID( "Hrzn" );
            desc6.putEnumerated( idOrnt, idOrnt, idHrzn );
            var idAntA = charIDToTypeID( "AntA" );
            var idAnnt = charIDToTypeID( "Annt" );
            var idAnCr = charIDToTypeID( "AnCr" );
            desc6.putEnumerated( idAntA, idAnnt, idAnCr );
            var idbounds = stringIDToTypeID( "bounds" );
                var desc8 = new ActionDescriptor();
                var idLeft = charIDToTypeID( "Left" );
                var idPnt = charIDToTypeID( "#Pnt" );
                desc8.putUnitDouble( idLeft, idPnt, 0.000000 );
                var idTop = charIDToTypeID( "Top " );
                var idPnt = charIDToTypeID( "#Pnt" );
                desc8.putUnitDouble( idTop, idPnt, -95.852051 );
                var idRght = charIDToTypeID( "Rght" );
                var idPnt = charIDToTypeID( "#Pnt" );
                desc8.putUnitDouble( idRght, idPnt, 1318.981323 );
                var idBtom = charIDToTypeID( "Btom" );
                var idPnt = charIDToTypeID( "#Pnt" );
                desc8.putUnitDouble( idBtom, idPnt, 141.910156 );
            var idbounds = stringIDToTypeID( "bounds" );
            desc6.putObject( idbounds, idbounds, desc8 );
            var idboundingBox = stringIDToTypeID( "boundingBox" );
                var desc9 = new ActionDescriptor();
                var idLeft = charIDToTypeID( "Left" );
                var idPnt = charIDToTypeID( "#Pnt" );
                desc9.putUnitDouble( idLeft, idPnt, 4.000000 );
                var idTop = charIDToTypeID( "Top " );
                var idPnt = charIDToTypeID( "#Pnt" );
                desc9.putUnitDouble( idTop, idPnt, -80.000000 );
                var idRght = charIDToTypeID( "Rght" );
                var idPnt = charIDToTypeID( "#Pnt" );
                desc9.putUnitDouble( idRght, idPnt, 1307.720215 );
                var idBtom = charIDToTypeID( "Btom" );
                var idPnt = charIDToTypeID( "#Pnt" );
                desc9.putUnitDouble( idBtom, idPnt, 119.000000 );
            var idboundingBox = stringIDToTypeID( "boundingBox" );
            desc6.putObject( idboundingBox, idboundingBox, desc9 );
            var idtextShape = stringIDToTypeID( "textShape" );
                var list1 = new ActionList();
                    var desc10 = new ActionDescriptor();
                    var idTEXT = charIDToTypeID( "TEXT" );
                    var idTEXT = charIDToTypeID( "TEXT" );
                    var idPnt = charIDToTypeID( "Pnt " );
                    desc10.putEnumerated( idTEXT, idTEXT, idPnt );
                    var idOrnt = charIDToTypeID( "Ornt" );
                    var idOrnt = charIDToTypeID( "Ornt" );
                    var idHrzn = charIDToTypeID( "Hrzn" );
                    desc10.putEnumerated( idOrnt, idOrnt, idHrzn );
                    var idTrnf = charIDToTypeID( "Trnf" );
                        var desc11 = new ActionDescriptor();
                        var idxx = stringIDToTypeID( "xx" );
                        desc11.putDouble( idxx, 1.000000 );
                        var idxy = stringIDToTypeID( "xy" );
                        desc11.putDouble( idxy, 0.000000 );
                        var idyx = stringIDToTypeID( "yx" );
                        desc11.putDouble( idyx, 0.000000 );
                        var idyy = stringIDToTypeID( "yy" );
                        desc11.putDouble( idyy, 1.000000 );
                        var idtx = stringIDToTypeID( "tx" );
                        desc11.putDouble( idtx, 0.000000 );
                        var idty = stringIDToTypeID( "ty" );
                        desc11.putDouble( idty, 0.000000 );
                    var idTrnf = charIDToTypeID( "Trnf" );
                    desc10.putObject( idTrnf, idTrnf, desc11 );
                    var idrowCount = stringIDToTypeID( "rowCount" );
                    desc10.putInteger( idrowCount, 1 );
                    var idcolumnCount = stringIDToTypeID( "columnCount" );
                    desc10.putInteger( idcolumnCount, 1 );
                    var idrowMajorOrder = stringIDToTypeID( "rowMajorOrder" );
                    desc10.putBoolean( idrowMajorOrder, true );
                    var idrowGutter = stringIDToTypeID( "rowGutter" );
                    var idPnt = charIDToTypeID( "#Pnt" );
                    desc10.putUnitDouble( idrowGutter, idPnt, 0.000000 );
                    var idcolumnGutter = stringIDToTypeID( "columnGutter" );
                    var idPnt = charIDToTypeID( "#Pnt" );
                    desc10.putUnitDouble( idcolumnGutter, idPnt, 0.000000 );
                    var idSpcn = charIDToTypeID( "Spcn" );
                    var idPnt = charIDToTypeID( "#Pnt" );
                    desc10.putUnitDouble( idSpcn, idPnt, 0.000000 );
                    var idframeBaselineAlignment = stringIDToTypeID( "frameBaselineAlignment" );
                    var idframeBaselineAlignment = stringIDToTypeID( "frameBaselineAlignment" );
                    var idalignByAscent = stringIDToTypeID( "alignByAscent" );
                    desc10.putEnumerated( idframeBaselineAlignment, idframeBaselineAlignment, idalignByAscent );
                    var idfirstBaselineMinimum = stringIDToTypeID( "firstBaselineMinimum" );
                    var idPnt = charIDToTypeID( "#Pnt" );
                    desc10.putUnitDouble( idfirstBaselineMinimum, idPnt, 0.000000 );
                    var idbase = stringIDToTypeID( "base" );
                        var desc12 = new ActionDescriptor();
                        var idHrzn = charIDToTypeID( "Hrzn" );
                        desc12.putDouble( idHrzn, 0.000000 );
                        var idVrtc = charIDToTypeID( "Vrtc" );
                        desc12.putDouble( idVrtc, 0.000000 );
                    var idPnt = charIDToTypeID( "Pnt " );
                    desc10.putObject( idbase, idPnt, desc12 );
                var idtextShape = stringIDToTypeID( "textShape" );
                list1.putObject( idtextShape, desc10 );
            desc6.putList( idtextShape, list1 );
            var idTxtt = charIDToTypeID( "Txtt" );
                var list2 = new ActionList();
                    var desc13 = new ActionDescriptor();
                    var idFrom = charIDToTypeID( "From" );
                    desc13.putInteger( idFrom, 0 );
                    var idT = charIDToTypeID( "T   " );
                    desc13.putInteger( idT, 48 );
                    var idTxtS = charIDToTypeID( "TxtS" );
                        var desc14 = new ActionDescriptor();
                        var idstyleSheetHasParent = stringIDToTypeID( "styleSheetHasParent" );
                        desc14.putBoolean( idstyleSheetHasParent, true );
                        var idfontPostScriptName = stringIDToTypeID( "fontPostScriptName" );
                        desc14.putString( idfontPostScriptName, """ProximaNova-Bold""" );
                        var idFntN = charIDToTypeID( "FntN" );
                        desc14.putString( idFntN, """Proxima Nova""" );
                        var idFntS = charIDToTypeID( "FntS" );
                        desc14.putString( idFntS, """Bold""" );
                        var idScrp = charIDToTypeID( "Scrp" );
                        desc14.putInteger( idScrp, 0 );
                        var idFntT = charIDToTypeID( "FntT" );
                        desc14.putInteger( idFntT, 1 );
                        var idSz = charIDToTypeID( "Sz  " );
                        var idPnt = charIDToTypeID( "#Pnt" );
                        desc14.putUnitDouble( idSz, idPnt, 115.000000 );
                        var idHrzS = charIDToTypeID( "HrzS" );
                        desc14.putDouble( idHrzS, 100.000000 );
                        var idVrtS = charIDToTypeID( "VrtS" );
                        desc14.putDouble( idVrtS, 100.000000 );
                        var idsyntheticBold = stringIDToTypeID( "syntheticBold" );
                        desc14.putBoolean( idsyntheticBold, false );
                        var idsyntheticItalic = stringIDToTypeID( "syntheticItalic" );
                        desc14.putBoolean( idsyntheticItalic, false );
                        var idautoLeading = stringIDToTypeID( "autoLeading" );
                        desc14.putBoolean( idautoLeading, false );
                        var idLdng = charIDToTypeID( "Ldng" );
                        var idPnt = charIDToTypeID( "#Pnt" );
                        desc14.putUnitDouble( idLdng, idPnt, 119.000000 );
                        var idTrck = charIDToTypeID( "Trck" );
                        desc14.putInteger( idTrck, 15 );
                        var idBsln = charIDToTypeID( "Bsln" );
                        var idPnt = charIDToTypeID( "#Pnt" );
                        desc14.putUnitDouble( idBsln, idPnt, 0.000000 );
                        var idcharacterRotation = stringIDToTypeID( "characterRotation" );
                        desc14.putDouble( idcharacterRotation, 0.000000 );
                        var idAtKr = charIDToTypeID( "AtKr" );
                        var idAtKr = charIDToTypeID( "AtKr" );
                        var idopticalKern = stringIDToTypeID( "opticalKern" );
                        desc14.putEnumerated( idAtKr, idAtKr, idopticalKern );
                        var idfontCaps = stringIDToTypeID( "fontCaps" );
                        var idfontCaps = stringIDToTypeID( "fontCaps" );
                        var idNrml = charIDToTypeID( "Nrml" );
                        desc14.putEnumerated( idfontCaps, idfontCaps, idNrml );
                        var iddigitSet = stringIDToTypeID( "digitSet" );
                        var iddigitSet = stringIDToTypeID( "digitSet" );
                        var iddefaultDigits = stringIDToTypeID( "defaultDigits" );
                        desc14.putEnumerated( iddigitSet, iddigitSet, iddefaultDigits );
                        var iddirOverride = stringIDToTypeID( "dirOverride" );
                        var iddirOverride = stringIDToTypeID( "dirOverride" );
                        var iddirOverrideDefault = stringIDToTypeID( "dirOverrideDefault" );
                        desc14.putEnumerated( iddirOverride, iddirOverride, iddirOverrideDefault );
                        var idkashidas = stringIDToTypeID( "kashidas" );
                        var idkashidas = stringIDToTypeID( "kashidas" );
                        var idkashidaDefault = stringIDToTypeID( "kashidaDefault" );
                        desc14.putEnumerated( idkashidas, idkashidas, idkashidaDefault );
                        var iddiacVPos = stringIDToTypeID( "diacVPos" );
                        var iddiacVPos = stringIDToTypeID( "diacVPos" );
                        var iddiacVPosOpenType = stringIDToTypeID( "diacVPosOpenType" );
                        desc14.putEnumerated( iddiacVPos, iddiacVPos, iddiacVPosOpenType );
                        var iddiacXOffset = stringIDToTypeID( "diacXOffset" );
                        var idPnt = charIDToTypeID( "#Pnt" );
                        desc14.putUnitDouble( iddiacXOffset, idPnt, 0.000000 );
                        var iddiacYOffset = stringIDToTypeID( "diacYOffset" );
                        var idPnt = charIDToTypeID( "#Pnt" );
                        desc14.putUnitDouble( iddiacYOffset, idPnt, 0.000000 );
                        var idbaseline = stringIDToTypeID( "baseline" );
                        var idbaseline = stringIDToTypeID( "baseline" );
                        var idNrml = charIDToTypeID( "Nrml" );
                        desc14.putEnumerated( idbaseline, idbaseline, idNrml );
                        var idotbaseline = stringIDToTypeID( "otbaseline" );
                        var idotbaseline = stringIDToTypeID( "otbaseline" );
                        var idNrml = charIDToTypeID( "Nrml" );
                        desc14.putEnumerated( idotbaseline, idotbaseline, idNrml );
                        var idstrikethrough = stringIDToTypeID( "strikethrough" );
                        var idstrikethrough = stringIDToTypeID( "strikethrough" );
                        var idstrikethroughOff = stringIDToTypeID( "strikethroughOff" );
                        desc14.putEnumerated( idstrikethrough, idstrikethrough, idstrikethroughOff );
                        var idUndl = charIDToTypeID( "Undl" );
                        var idUndl = charIDToTypeID( "Undl" );
                        var idunderlineOff = stringIDToTypeID( "underlineOff" );
                        desc14.putEnumerated( idUndl, idUndl, idunderlineOff );
                        var idunderlineOffset = stringIDToTypeID( "underlineOffset" );
                        var idPnt = charIDToTypeID( "#Pnt" );
                        desc14.putUnitDouble( idunderlineOffset, idPnt, 0.000000 );
                        var idligature = stringIDToTypeID( "ligature" );
                        desc14.putBoolean( idligature, true );
                        var idaltligature = stringIDToTypeID( "altligature" );
                        desc14.putBoolean( idaltligature, false );
                        var idcontextualLigatures = stringIDToTypeID( "contextualLigatures" );
                        desc14.putBoolean( idcontextualLigatures, true );
                        var idalternateLigatures = stringIDToTypeID( "alternateLigatures" );
                        desc14.putBoolean( idalternateLigatures, false );
                        var idoldStyle = stringIDToTypeID( "oldStyle" );
                        desc14.putBoolean( idoldStyle, false );
                        var idfractions = stringIDToTypeID( "fractions" );
                        desc14.putBoolean( idfractions, false );
                        var idordinals = stringIDToTypeID( "ordinals" );
                        desc14.putBoolean( idordinals, false );
                        var idswash = stringIDToTypeID( "swash" );
                        desc14.putBoolean( idswash, false );
                        var idtitling = stringIDToTypeID( "titling" );
                        desc14.putBoolean( idtitling, false );
                        var idconnectionForms = stringIDToTypeID( "connectionForms" );
                        desc14.putBoolean( idconnectionForms, true );
                        var idstylisticAlternates = stringIDToTypeID( "stylisticAlternates" );
                        desc14.putBoolean( idstylisticAlternates, false );
                        var idornaments = stringIDToTypeID( "ornaments" );
                        desc14.putBoolean( idornaments, false );
                        var idjustificationAlternates = stringIDToTypeID( "justificationAlternates" );
                        desc14.putBoolean( idjustificationAlternates, false );
                        var idfigureStyle = stringIDToTypeID( "figureStyle" );
                        var idfigureStyle = stringIDToTypeID( "figureStyle" );
                        var idNrml = charIDToTypeID( "Nrml" );
                        desc14.putEnumerated( idfigureStyle, idfigureStyle, idNrml );
                        var idproportionalMetrics = stringIDToTypeID( "proportionalMetrics" );
                        desc14.putBoolean( idproportionalMetrics, false );
                        var idkana = stringIDToTypeID( "kana" );
                        desc14.putBoolean( idkana, false );
                        var iditalics = stringIDToTypeID( "italics" );
                        desc14.putBoolean( iditalics, false );
                        var idruby = stringIDToTypeID( "ruby" );
                        desc14.putBoolean( idruby, false );
                        var idbaselineDirection = stringIDToTypeID( "baselineDirection" );
                        var idbaselineDirection = stringIDToTypeID( "baselineDirection" );
                        var idwithStream = stringIDToTypeID( "withStream" );
                        desc14.putEnumerated( idbaselineDirection, idbaselineDirection, idwithStream );
                        var idtextLanguage = stringIDToTypeID( "textLanguage" );
                        var idtextLanguage = stringIDToTypeID( "textLanguage" );
                        var idenglishLanguage = stringIDToTypeID( "englishLanguage" );
                        desc14.putEnumerated( idtextLanguage, idtextLanguage, idenglishLanguage );
                        var idjapaneseAlternate = stringIDToTypeID( "japaneseAlternate" );
                        var idjapaneseAlternate = stringIDToTypeID( "japaneseAlternate" );
                        var iddefaultForm = stringIDToTypeID( "defaultForm" );
                        desc14.putEnumerated( idjapaneseAlternate, idjapaneseAlternate, iddefaultForm );
                        var idmojiZume = stringIDToTypeID( "mojiZume" );
                        desc14.putDouble( idmojiZume, 0.000000 );
                        var idgridAlignment = stringIDToTypeID( "gridAlignment" );
                        var idgridAlignment = stringIDToTypeID( "gridAlignment" );
                        var idroman = stringIDToTypeID( "roman" );
                        desc14.putEnumerated( idgridAlignment, idgridAlignment, idroman );
                        var idenableWariChu = stringIDToTypeID( "enableWariChu" );
                        desc14.putBoolean( idenableWariChu, false );
                        var idwariChuCount = stringIDToTypeID( "wariChuCount" );
                        desc14.putInteger( idwariChuCount, 2 );
                        var idwariChuLineGap = stringIDToTypeID( "wariChuLineGap" );
                        desc14.putInteger( idwariChuLineGap, 0 );
                        var idwariChuScale = stringIDToTypeID( "wariChuScale" );
                        desc14.putDouble( idwariChuScale, 0.500000 );
                        var idwariChuWidow = stringIDToTypeID( "wariChuWidow" );
                        desc14.putInteger( idwariChuWidow, 2 );
                        var idwariChuOrphan = stringIDToTypeID( "wariChuOrphan" );
                        desc14.putInteger( idwariChuOrphan, 2 );
                        var idwariChuJustification = stringIDToTypeID( "wariChuJustification" );
                        var idwariChuJustification = stringIDToTypeID( "wariChuJustification" );
                        var idwariChuAutoJustify = stringIDToTypeID( "wariChuAutoJustify" );
                        desc14.putEnumerated( idwariChuJustification, idwariChuJustification, idwariChuAutoJustify );
                        var idtcyUpDown = stringIDToTypeID( "tcyUpDown" );
                        desc14.putInteger( idtcyUpDown, 0 );
                        var idtcyLeftRight = stringIDToTypeID( "tcyLeftRight" );
                        desc14.putInteger( idtcyLeftRight, 0 );
                        var idleftAki = stringIDToTypeID( "leftAki" );
                        desc14.putDouble( idleftAki, -1.000000 );
                        var idrightAki = stringIDToTypeID( "rightAki" );
                        desc14.putDouble( idrightAki, -1.000000 );
                        var idjiDori = stringIDToTypeID( "jiDori" );
                        desc14.putInteger( idjiDori, 0 );
                        var idnoBreak = stringIDToTypeID( "noBreak" );
                        desc14.putBoolean( idnoBreak, false );
                        var idClr = charIDToTypeID( "Clr " );
                            var desc15 = new ActionDescriptor();
                            var idRd = charIDToTypeID( "Rd  " );
                            desc15.putDouble( idRd, 30.217500 );
                            var idGrn = charIDToTypeID( "Grn " );
                            desc15.putDouble( idGrn, 76.104756 );
                            var idBl = charIDToTypeID( "Bl  " );
                            desc15.putDouble( idBl, 114.999902 );
                        var idRGBC = charIDToTypeID( "RGBC" );
                        desc14.putObject( idClr, idRGBC, desc15 );
                        var idstrokeColor = stringIDToTypeID( "strokeColor" );
                            var desc16 = new ActionDescriptor();
                            var idRd = charIDToTypeID( "Rd  " );
                            desc16.putDouble( idRd, 30.217500 );
                            var idGrn = charIDToTypeID( "Grn " );
                            desc16.putDouble( idGrn, 76.104756 );
                            var idBl = charIDToTypeID( "Bl  " );
                            desc16.putDouble( idBl, 114.999902 );
                        var idRGBC = charIDToTypeID( "RGBC" );
                        desc14.putObject( idstrokeColor, idRGBC, desc16 );
                        var idFl = charIDToTypeID( "Fl  " );
                        desc14.putBoolean( idFl, true );
                        var idStrk = charIDToTypeID( "Strk" );
                        desc14.putBoolean( idStrk, false );
                        var idfillFirst = stringIDToTypeID( "fillFirst" );
                        desc14.putBoolean( idfillFirst, false );
                        var idfillOverPrint = stringIDToTypeID( "fillOverPrint" );
                        desc14.putBoolean( idfillOverPrint, false );
                        var idstrokeOverPrint = stringIDToTypeID( "strokeOverPrint" );
                        desc14.putBoolean( idstrokeOverPrint, false );
                        var idlineCap = stringIDToTypeID( "lineCap" );
                        var idlineCap = stringIDToTypeID( "lineCap" );
                        var idbuttCap = stringIDToTypeID( "buttCap" );
                        desc14.putEnumerated( idlineCap, idlineCap, idbuttCap );
                        var idlineJoin = stringIDToTypeID( "lineJoin" );
                        var idlineJoin = stringIDToTypeID( "lineJoin" );
                        var idmiterJoin = stringIDToTypeID( "miterJoin" );
                        desc14.putEnumerated( idlineJoin, idlineJoin, idmiterJoin );
                        var idlineWidth = stringIDToTypeID( "lineWidth" );
                        var idPnt = charIDToTypeID( "#Pnt" );
                        desc14.putUnitDouble( idlineWidth, idPnt, 1.050280 );
                        var idmiterLimit = stringIDToTypeID( "miterLimit" );
                        var idPnt = charIDToTypeID( "#Pnt" );
                        desc14.putUnitDouble( idmiterLimit, idPnt, 1.050280 );
                        var idlineDashoffset = stringIDToTypeID( "lineDashoffset" );
                        desc14.putDouble( idlineDashoffset, 0.000000 );
                    var idTxtS = charIDToTypeID( "TxtS" );
                    desc13.putObject( idTxtS, idTxtS, desc14 );
                var idTxtt = charIDToTypeID( "Txtt" );
                list2.putObject( idTxtt, desc13 );
            desc6.putList( idTxtt, list2 );
            var idparagraphStyleRange = stringIDToTypeID( "paragraphStyleRange" );
                var list3 = new ActionList();
                    var desc17 = new ActionDescriptor();
                    var idFrom = charIDToTypeID( "From" );
                    desc17.putInteger( idFrom, 0 );
                    var idT = charIDToTypeID( "T   " );
                    desc17.putInteger( idT, 28 );
                    var idparagraphStyle = stringIDToTypeID( "paragraphStyle" );
                        var desc18 = new ActionDescriptor();
                        var idstyleSheetHasParent = stringIDToTypeID( "styleSheetHasParent" );
                        desc18.putBoolean( idstyleSheetHasParent, true );
                        var idAlgn = charIDToTypeID( "Algn" );
                        var idAlg = charIDToTypeID( "Alg " );
                        var idLeft = charIDToTypeID( "Left" );
                        desc18.putEnumerated( idAlgn, idAlg, idLeft );
                        var idfirstLineIndent = stringIDToTypeID( "firstLineIndent" );
                        var idPnt = charIDToTypeID( "#Pnt" );
                        desc18.putUnitDouble( idfirstLineIndent, idPnt, 0.000000 );
                        var idstartIndent = stringIDToTypeID( "startIndent" );
                        var idPnt = charIDToTypeID( "#Pnt" );
                        desc18.putUnitDouble( idstartIndent, idPnt, 0.000000 );
                        var idendIndent = stringIDToTypeID( "endIndent" );
                        var idPnt = charIDToTypeID( "#Pnt" );
                        desc18.putUnitDouble( idendIndent, idPnt, 0.000000 );
                        var idspaceBefore = stringIDToTypeID( "spaceBefore" );
                        var idPnt = charIDToTypeID( "#Pnt" );
                        desc18.putUnitDouble( idspaceBefore, idPnt, 0.000000 );
                        var idspaceAfter = stringIDToTypeID( "spaceAfter" );
                        var idPnt = charIDToTypeID( "#Pnt" );
                        desc18.putUnitDouble( idspaceAfter, idPnt, 0.000000 );
                        var iddropCapMultiplier = stringIDToTypeID( "dropCapMultiplier" );
                        desc18.putInteger( iddropCapMultiplier, 1 );
                        var idautoLeadingPercentage = stringIDToTypeID( "autoLeadingPercentage" );
                        desc18.putDouble( idautoLeadingPercentage, 1.200000 );
                        var idleadingType = stringIDToTypeID( "leadingType" );
                        var idleadingType = stringIDToTypeID( "leadingType" );
                        var idleadingBelow = stringIDToTypeID( "leadingBelow" );
                        desc18.putEnumerated( idleadingType, idleadingType, idleadingBelow );
                        var iddirectionType = stringIDToTypeID( "directionType" );
                        var iddirectionType = stringIDToTypeID( "directionType" );
                        var iddirLeftToRight = stringIDToTypeID( "dirLeftToRight" );
                        desc18.putEnumerated( iddirectionType, iddirectionType, iddirLeftToRight );
                        var idjustificationMethodType = stringIDToTypeID( "justificationMethodType" );
                        var idjustificationMethodType = stringIDToTypeID( "justificationMethodType" );
                        var idjustifMethodDefault = stringIDToTypeID( "justifMethodDefault" );
                        desc18.putEnumerated( idjustificationMethodType, idjustificationMethodType, idjustifMethodDefault );
                        var idhyphenate = stringIDToTypeID( "hyphenate" );
                        desc18.putBoolean( idhyphenate, false );
                        var idhyphenateWordSize = stringIDToTypeID( "hyphenateWordSize" );
                        desc18.putInteger( idhyphenateWordSize, 6 );
                        var idhyphenatePreLength = stringIDToTypeID( "hyphenatePreLength" );
                        desc18.putInteger( idhyphenatePreLength, 2 );
                        var idhyphenatePostLength = stringIDToTypeID( "hyphenatePostLength" );
                        desc18.putInteger( idhyphenatePostLength, 2 );
                        var idhyphenateLimit = stringIDToTypeID( "hyphenateLimit" );
                        desc18.putInteger( idhyphenateLimit, 0 );
                        var idhyphenationZone = stringIDToTypeID( "hyphenationZone" );
                        desc18.putDouble( idhyphenationZone, 36.000000 );
                        var idhyphenateCapitalized = stringIDToTypeID( "hyphenateCapitalized" );
                        desc18.putBoolean( idhyphenateCapitalized, true );
                        var idhyphenationPreference = stringIDToTypeID( "hyphenationPreference" );
                        desc18.putDouble( idhyphenationPreference, 0.500000 );
                        var idjustificationWordMinimum = stringIDToTypeID( "justificationWordMinimum" );
                        desc18.putDouble( idjustificationWordMinimum, 0.800000 );
                        var idjustificationWordDesired = stringIDToTypeID( "justificationWordDesired" );
                        desc18.putDouble( idjustificationWordDesired, 1.000000 );
                        var idjustificationWordMaximum = stringIDToTypeID( "justificationWordMaximum" );
                        desc18.putDouble( idjustificationWordMaximum, 1.330000 );
                        var idjustificationLetterMinimum = stringIDToTypeID( "justificationLetterMinimum" );
                        desc18.putDouble( idjustificationLetterMinimum, 0.000000 );
                        var idjustificationLetterDesired = stringIDToTypeID( "justificationLetterDesired" );
                        desc18.putDouble( idjustificationLetterDesired, 0.000000 );
                        var idjustificationLetterMaximum = stringIDToTypeID( "justificationLetterMaximum" );
                        desc18.putDouble( idjustificationLetterMaximum, 0.000000 );
                        var idjustificationGlyphMinimum = stringIDToTypeID( "justificationGlyphMinimum" );
                        desc18.putDouble( idjustificationGlyphMinimum, 1.000000 );
                        var idjustificationGlyphDesired = stringIDToTypeID( "justificationGlyphDesired" );
                        desc18.putDouble( idjustificationGlyphDesired, 1.000000 );
                        var idjustificationGlyphMaximum = stringIDToTypeID( "justificationGlyphMaximum" );
                        desc18.putDouble( idjustificationGlyphMaximum, 1.000000 );
                        var idsingleWordJustification = stringIDToTypeID( "singleWordJustification" );
                        var idAlg = charIDToTypeID( "Alg " );
                        var idJstA = charIDToTypeID( "JstA" );
                        desc18.putEnumerated( idsingleWordJustification, idAlg, idJstA );
                        var idhangingRoman = stringIDToTypeID( "hangingRoman" );
                        desc18.putBoolean( idhangingRoman, false );
                        var idautoTCY = stringIDToTypeID( "autoTCY" );
                        desc18.putInteger( idautoTCY, 1 );
                        var idkeepTogether = stringIDToTypeID( "keepTogether" );
                        desc18.putBoolean( idkeepTogether, true );
                        var idburasagari = stringIDToTypeID( "burasagari" );
                        var idburasagari = stringIDToTypeID( "burasagari" );
                        var idburasagariNone = stringIDToTypeID( "burasagariNone" );
                        desc18.putEnumerated( idburasagari, idburasagari, idburasagariNone );
                        var idpreferredKinsokuOrder = stringIDToTypeID( "preferredKinsokuOrder" );
                        var idpreferredKinsokuOrder = stringIDToTypeID( "preferredKinsokuOrder" );
                        var idpushIn = stringIDToTypeID( "pushIn" );
                        desc18.putEnumerated( idpreferredKinsokuOrder, idpreferredKinsokuOrder, idpushIn );
                        var idkurikaeshiMojiShori = stringIDToTypeID( "kurikaeshiMojiShori" );
                        desc18.putBoolean( idkurikaeshiMojiShori, false );
                        var idtextEveryLineComposer = stringIDToTypeID( "textEveryLineComposer" );
                        desc18.putBoolean( idtextEveryLineComposer, false );
                        var idtextComposerEngine = stringIDToTypeID( "textComposerEngine" );
                        var idtextComposerEngine = stringIDToTypeID( "textComposerEngine" );
                        var idtextLatinCJKComposer = stringIDToTypeID( "textLatinCJKComposer" );
                        desc18.putEnumerated( idtextComposerEngine, idtextComposerEngine, idtextLatinCJKComposer );
                        var iddefaultTabWidth = stringIDToTypeID( "defaultTabWidth" );
                        desc18.putDouble( iddefaultTabWidth, 36.000000 );
                        var iddefaultStyle = stringIDToTypeID( "defaultStyle" );
                            var desc19 = new ActionDescriptor();
                            var idfontPostScriptName = stringIDToTypeID( "fontPostScriptName" );
                            desc19.putString( idfontPostScriptName, """MyriadPro-Regular""" );
                            var idFntN = charIDToTypeID( "FntN" );
                            desc19.putString( idFntN, """Myriad Pro""" );
                            var idFntS = charIDToTypeID( "FntS" );
                            desc19.putString( idFntS, """Regular""" );
                            var idScrp = charIDToTypeID( "Scrp" );
                            desc19.putInteger( idScrp, 0 );
                            var idFntT = charIDToTypeID( "FntT" );
                            desc19.putInteger( idFntT, 0 );
                            var idSz = charIDToTypeID( "Sz  " );
                            var idPnt = charIDToTypeID( "#Pnt" );
                            desc19.putUnitDouble( idSz, idPnt, 48.000000 );
                            var idHrzS = charIDToTypeID( "HrzS" );
                            desc19.putDouble( idHrzS, 100.000000 );
                            var idVrtS = charIDToTypeID( "VrtS" );
                            desc19.putDouble( idVrtS, 100.000000 );
                            var idsyntheticBold = stringIDToTypeID( "syntheticBold" );
                            desc19.putBoolean( idsyntheticBold, false );
                            var idsyntheticItalic = stringIDToTypeID( "syntheticItalic" );
                            desc19.putBoolean( idsyntheticItalic, false );
                            var idautoLeading = stringIDToTypeID( "autoLeading" );
                            desc19.putBoolean( idautoLeading, true );
                            var idTrck = charIDToTypeID( "Trck" );
                            desc19.putInteger( idTrck, 0 );
                            var idBsln = charIDToTypeID( "Bsln" );
                            var idPnt = charIDToTypeID( "#Pnt" );
                            desc19.putUnitDouble( idBsln, idPnt, 0.000000 );
                            var idcharacterRotation = stringIDToTypeID( "characterRotation" );
                            desc19.putDouble( idcharacterRotation, 0.000000 );
                            var idAtKr = charIDToTypeID( "AtKr" );
                            var idAtKr = charIDToTypeID( "AtKr" );
                            var idmetricsKern = stringIDToTypeID( "metricsKern" );
                            desc19.putEnumerated( idAtKr, idAtKr, idmetricsKern );
                            var idfontCaps = stringIDToTypeID( "fontCaps" );
                            var idfontCaps = stringIDToTypeID( "fontCaps" );
                            var idNrml = charIDToTypeID( "Nrml" );
                            desc19.putEnumerated( idfontCaps, idfontCaps, idNrml );
                            var iddigitSet = stringIDToTypeID( "digitSet" );
                            var iddigitSet = stringIDToTypeID( "digitSet" );
                            var iddefaultDigits = stringIDToTypeID( "defaultDigits" );
                            desc19.putEnumerated( iddigitSet, iddigitSet, iddefaultDigits );
                            var iddirOverride = stringIDToTypeID( "dirOverride" );
                            var iddirOverride = stringIDToTypeID( "dirOverride" );
                            var iddirOverrideDefault = stringIDToTypeID( "dirOverrideDefault" );
                            desc19.putEnumerated( iddirOverride, iddirOverride, iddirOverrideDefault );
                            var idkashidas = stringIDToTypeID( "kashidas" );
                            var idkashidas = stringIDToTypeID( "kashidas" );
                            var idkashidaDefault = stringIDToTypeID( "kashidaDefault" );
                            desc19.putEnumerated( idkashidas, idkashidas, idkashidaDefault );
                            var iddiacVPos = stringIDToTypeID( "diacVPos" );
                            var iddiacVPos = stringIDToTypeID( "diacVPos" );
                            var iddiacVPosOpenType = stringIDToTypeID( "diacVPosOpenType" );
                            desc19.putEnumerated( iddiacVPos, iddiacVPos, iddiacVPosOpenType );
                            var iddiacXOffset = stringIDToTypeID( "diacXOffset" );
                            var idPnt = charIDToTypeID( "#Pnt" );
                            desc19.putUnitDouble( iddiacXOffset, idPnt, 0.000000 );
                            var iddiacYOffset = stringIDToTypeID( "diacYOffset" );
                            var idPnt = charIDToTypeID( "#Pnt" );
                            desc19.putUnitDouble( iddiacYOffset, idPnt, 0.000000 );
                            var idbaseline = stringIDToTypeID( "baseline" );
                            var idbaseline = stringIDToTypeID( "baseline" );
                            var idNrml = charIDToTypeID( "Nrml" );
                            desc19.putEnumerated( idbaseline, idbaseline, idNrml );
                            var idotbaseline = stringIDToTypeID( "otbaseline" );
                            var idotbaseline = stringIDToTypeID( "otbaseline" );
                            var idNrml = charIDToTypeID( "Nrml" );
                            desc19.putEnumerated( idotbaseline, idotbaseline, idNrml );
                            var idstrikethrough = stringIDToTypeID( "strikethrough" );
                            var idstrikethrough = stringIDToTypeID( "strikethrough" );
                            var idstrikethroughOff = stringIDToTypeID( "strikethroughOff" );
                            desc19.putEnumerated( idstrikethrough, idstrikethrough, idstrikethroughOff );
                            var idUndl = charIDToTypeID( "Undl" );
                            var idUndl = charIDToTypeID( "Undl" );
                            var idunderlineOff = stringIDToTypeID( "underlineOff" );
                            desc19.putEnumerated( idUndl, idUndl, idunderlineOff );
                            var idunderlineOffset = stringIDToTypeID( "underlineOffset" );
                            var idPnt = charIDToTypeID( "#Pnt" );
                            desc19.putUnitDouble( idunderlineOffset, idPnt, 0.000000 );
                            var idligature = stringIDToTypeID( "ligature" );
                            desc19.putBoolean( idligature, true );
                            var idaltligature = stringIDToTypeID( "altligature" );
                            desc19.putBoolean( idaltligature, false );
                            var idcontextualLigatures = stringIDToTypeID( "contextualLigatures" );
                            desc19.putBoolean( idcontextualLigatures, false );
                            var idalternateLigatures = stringIDToTypeID( "alternateLigatures" );
                            desc19.putBoolean( idalternateLigatures, false );
                            var idoldStyle = stringIDToTypeID( "oldStyle" );
                            desc19.putBoolean( idoldStyle, false );
                            var idfractions = stringIDToTypeID( "fractions" );
                            desc19.putBoolean( idfractions, false );
                            var idordinals = stringIDToTypeID( "ordinals" );
                            desc19.putBoolean( idordinals, false );
                            var idswash = stringIDToTypeID( "swash" );
                            desc19.putBoolean( idswash, false );
                            var idtitling = stringIDToTypeID( "titling" );
                            desc19.putBoolean( idtitling, false );
                            var idconnectionForms = stringIDToTypeID( "connectionForms" );
                            desc19.putBoolean( idconnectionForms, false );
                            var idstylisticAlternates = stringIDToTypeID( "stylisticAlternates" );
                            desc19.putBoolean( idstylisticAlternates, false );
                            var idornaments = stringIDToTypeID( "ornaments" );
                            desc19.putBoolean( idornaments, false );
                            var idjustificationAlternates = stringIDToTypeID( "justificationAlternates" );
                            desc19.putBoolean( idjustificationAlternates, false );
                            var idfigureStyle = stringIDToTypeID( "figureStyle" );
                            var idfigureStyle = stringIDToTypeID( "figureStyle" );
                            var idNrml = charIDToTypeID( "Nrml" );
                            desc19.putEnumerated( idfigureStyle, idfigureStyle, idNrml );
                            var idproportionalMetrics = stringIDToTypeID( "proportionalMetrics" );
                            desc19.putBoolean( idproportionalMetrics, false );
                            var idkana = stringIDToTypeID( "kana" );
                            desc19.putBoolean( idkana, false );
                            var iditalics = stringIDToTypeID( "italics" );
                            desc19.putBoolean( iditalics, false );
                            var idruby = stringIDToTypeID( "ruby" );
                            desc19.putBoolean( idruby, false );
                            var idbaselineDirection = stringIDToTypeID( "baselineDirection" );
                            var idbaselineDirection = stringIDToTypeID( "baselineDirection" );
                            var idrotated = stringIDToTypeID( "rotated" );
                            desc19.putEnumerated( idbaselineDirection, idbaselineDirection, idrotated );
                            var idtextLanguage = stringIDToTypeID( "textLanguage" );
                            var idtextLanguage = stringIDToTypeID( "textLanguage" );
                            var idenglishLanguage = stringIDToTypeID( "englishLanguage" );
                            desc19.putEnumerated( idtextLanguage, idtextLanguage, idenglishLanguage );
                            var idmojiZume = stringIDToTypeID( "mojiZume" );
                            desc19.putDouble( idmojiZume, 0.000000 );
                            var idgridAlignment = stringIDToTypeID( "gridAlignment" );
                            var idgridAlignment = stringIDToTypeID( "gridAlignment" );
                            var idroman = stringIDToTypeID( "roman" );
                            desc19.putEnumerated( idgridAlignment, idgridAlignment, idroman );
                            var idenableWariChu = stringIDToTypeID( "enableWariChu" );
                            desc19.putBoolean( idenableWariChu, false );
                            var idwariChuCount = stringIDToTypeID( "wariChuCount" );
                            desc19.putInteger( idwariChuCount, 2 );
                            var idwariChuLineGap = stringIDToTypeID( "wariChuLineGap" );
                            desc19.putInteger( idwariChuLineGap, 0 );
                            var idwariChuScale = stringIDToTypeID( "wariChuScale" );
                            desc19.putDouble( idwariChuScale, 0.500000 );
                            var idwariChuWidow = stringIDToTypeID( "wariChuWidow" );
                            desc19.putInteger( idwariChuWidow, 2 );
                            var idwariChuOrphan = stringIDToTypeID( "wariChuOrphan" );
                            desc19.putInteger( idwariChuOrphan, 2 );
                            var idwariChuJustification = stringIDToTypeID( "wariChuJustification" );
                            var idwariChuJustification = stringIDToTypeID( "wariChuJustification" );
                            var idwariChuAutoJustify = stringIDToTypeID( "wariChuAutoJustify" );
                            desc19.putEnumerated( idwariChuJustification, idwariChuJustification, idwariChuAutoJustify );
                            var idtcyUpDown = stringIDToTypeID( "tcyUpDown" );
                            desc19.putInteger( idtcyUpDown, 0 );
                            var idtcyLeftRight = stringIDToTypeID( "tcyLeftRight" );
                            desc19.putInteger( idtcyLeftRight, 0 );
                            var idleftAki = stringIDToTypeID( "leftAki" );
                            desc19.putDouble( idleftAki, -1.000000 );
                            var idrightAki = stringIDToTypeID( "rightAki" );
                            desc19.putDouble( idrightAki, -1.000000 );
                            var idjiDori = stringIDToTypeID( "jiDori" );
                            desc19.putInteger( idjiDori, 0 );
                            var idnoBreak = stringIDToTypeID( "noBreak" );
                            desc19.putBoolean( idnoBreak, false );
                            var idClr = charIDToTypeID( "Clr " );
                                var desc20 = new ActionDescriptor();
                                var idRd = charIDToTypeID( "Rd  " );
                                desc20.putDouble( idRd, 0.000000 );
                                var idGrn = charIDToTypeID( "Grn " );
                                desc20.putDouble( idGrn, 0.000000 );
                                var idBl = charIDToTypeID( "Bl  " );
                                desc20.putDouble( idBl, 0.000000 );
                            var idRGBC = charIDToTypeID( "RGBC" );
                            desc19.putObject( idClr, idRGBC, desc20 );
                            var idstrokeColor = stringIDToTypeID( "strokeColor" );
                                var desc21 = new ActionDescriptor();
                              

    That is awesome, works perfectly.
    I'll get it worked into my main script. Is this Action Manager code, and not just regular Javascript from the Scripting Dictionary? I can't tell the difference. I'll see whether or not it's actually faster than Applescript.
    Thanks. I know Scripting Listener records a bunch of stuff, but it's pretty amazing to me that playing back this line does the same thing that playing back the 1,011 lines Scripting Listener puts out.
    Thanks.

  • Visited the house next door. Got kicked out when I offered a gift

    I'm not the first and  I won't be the last.  I just got lured into it. Others have described this problem online in much less temperate language than I intend to use.
    I am Applescripting away in InDesign, minding my own business, when it strikes me that I can simplify a rather tedious workflow involving images.
    So I end up getting Photoshop to open an image I've got the lowdown on from InDesign. It's the first time I've opened the Photoshop Applescript dictionary and I am delighted to discover I can do all sorts of cool things. My script ends up prepping an image for editing in Photoshop.
    Then I have the bright idea of writing a second script starting in Photoshop after the edit, doing the housekeeping, saving a copy of the image in a Hi Res images folder, closing the original without saving (it's a Jpeg workflow ) and getting the Finder to hide it in a Done folder, then returning to InDesign to re-link the image to the processed one in the High Res folder.
    Finish writing it and then discover that to enter the kingdom of heaven that is Photoshop's Scripts folder, it has to be JavaScript. Applescript not
    welcome.
    I've nothing against JavaSceipt, except that I haven't learned it. In fact this has prompted me to download the demo of BBedit and some docs on the language.
    It's just that hating to waste some hours of labour, I was wondering if my first JavaScript could be to launch my Applescript. Thus I could get into the Photoshop Scripts folder in disguise and assign a hotkey to it.
    Is it possible I could do that with a JavaScript, or are there any other solutions... which don't require expenditure? I am doing this for a company that is tightening its belt so often that it squeaks when it speaks.

    Thanks, Shane, I have FastScripts on my laptop. It's version 2.31. I will probably have to fork out another fifteen bucks to get up to version 4, which I see is the current one. If it were just for me it would be the ideal solution, but there's no way I could persuade the company to get it for multiple machines. They have the USBs locked against pen drives, for goodness sake.
    However, I have slept on the matter and am about to go all Mills and Boon (publishers of romantic fiction).
    Did I say house next door? It's a luxuriously-appointed mansion in which I have spent many a joyous hour ... so long as I'm wearing my User hat.
    But when I put on my Scripter hat and approach the servants' quarters, the normally genial butler, Jeeves, goes all red in the face, like a traffic light, and bars my way. I think he suspects me of harbouring dishonourable intentions towards Minnie, the charming chambermaid.
    And I can't deny there's... electricity .... between us.  Love must have its way and I have a devious plan.
    I could approach Jeeves and address him courteously in impeccable Javascript: "Good evening, Jeeves, set your foreground colour to green for a change!" then turn and call out to my ally, Indy, saying: "It's time to do my Applescript now!"
    Since I have been using both the InDesign and Photoshop dictionaries in single Applescripts, surely it would be possible for a Javascript to do the same? I'm going to give it a try.
    Will I get to marry Minnie and make lots of beautiful babies or will Jeeves produce a cosh and flatten me?
    Any tips or snippets from experienced Javascripters for a total Javascript ignoramus will be gratefully received!

  • Exporting Slideshows with Aperture

    I am a professional wedding photographer just starting to use Aperture.
    I currently deliver DVD slideshows to my clients instead of paper proofs. I use an action and an apple script in Photoshop to batch all the files from a wedding to have a black border around them and display the file name in the black border below the file. I must have the file name because, that is how my clients place there order. I then use DVD Studio Pro to group my slides into groups of 99 and create slideshows with DVD Studio Pro.
    Is there a way to use Aperture to automate this process? I would like to select the images that I want, have Aperture size them for NTSC, display the file name so that it is readable and not cropped out of a standard TV screen, and then create slideshows in iDVD or DVD Studio Pro for me. I would also like to put a signature on the bottom right corner of each photograph.
    I know this is asking a lot, but I REALLY need something like this to speed up my process and bring a new look to my work. Any suggestions?
    Kevin Hawkins

    kevin:
    aperture has automator actions for exporting images from albums (at any one of the export preset sizes). you could, with a little scripting expertise, convert the photoshop applescript that you have now into an autmator action. (i have several automator actions that i've built that feed images into photoshop.) then it would be a matter of building an automator workflow that sets everything up in the right sequence and pressing run.
    if you need help getting this done, visit my web site and on the "about me" page, you'll find some contact info (including email address).
    scott
    PowerMac G5 2.5GHz   Mac OS X (10.4.8)   MacBook Pro 2.0GHz

  • Changes to Photoshop CS5 and Applescript

    Looks like there are some major Applescript changes to CS5, which is unwelcome for anyone with existing scripts. From what I can see, the difference (that affect me anyway) are
    a) PSCS5 seems to dislike referring to files with "as alias" and removing this from my scripts helps them to work, whereas other apps need it, as did previous
    b) apparently script support for referring to the currently document has changed. "if visible layer of current document is true then..." no longer works, nor do document 0, document 1, etc. Anyone know how to refer to the current document?
    c) support for history doesn't seem to be there anymore. I cannot seem to use AS commands like, "set myState to history states as list" or "set current history state to history state newState" were awesome for my workflow, but are they impossible to achieve now?
    d) One more. The important "set docref to make new document with properties {height: 150, width: 150}" is also broken. How would one make a new document in Applescript?
    I'd appreciate any help you could give me in updating my scripts

    I just found the AppleScript documentation in /Applications/Adobe Photoshop CS5/Scripting/Documents/. But I don't think it's even accurate. Here's a very simple sample they give:
    tell application "Adobe Photoshop CS5"
         filter current layer of the current document using lens blur with options {class:lens blur, radius:13}
    end tell
    If I enter this in AppleScript Editor and try to compile it, it selects the word "current" and tells me "Expected end of line but found identifier." It doesn't even recognize "filter" as a command. If I just change that 5 to a 4, it works fine in CS4.
    Here's one way to run a JavaScript file from AppleScript:
    tell application "Adobe Photoshop CS5" to open file "Path:to:file.jsx"
    Of course there's no way to pass any arguments this way, so that greatly limits its usefulness. But perhaps this will be helpful to some people. I'm assuming the JavaScript stuff all works fine, as that seems to be their focus these days.
    The really strange thing is that certain things seem to work fine in AppleScripts that are already compiled (using CS4). But if I try to re-save those scripts with CS5 installed, I get errors.

  • Moving a layer in Photoshop CS5 using Applescript

    I have a layer in a document called "logo" and i want to duplicate it to every open document and then move it to a specific spot in each document
    I got the duplicating thing happening but cant seem to move the bounds of the layer (says it is read only and cannot be changed)
    here is what I have written
    tell application "Adobe Photoshop CS5"
    activate
    set theDocs to count of documents
    repeat with i from 1 to theDocs
    duplicate art layer "logo" of current document to document i
    end repeat
    repeat with i from 1 to theDocs
    set current document to document i
    tell document i
    set bounds of art layer "logo" to {0.456666666667, 6.38, 2.88, 6.77}
    --Adobe Photoshop CS5 got an error: Property is read/only and cannot be changed
    end tell
    end repeat
    end tell
    This doesn't error but also doesn't move the logo at all
    tell application "Adobe Photoshop CS5"
    activate
    set theDocs to count of documents
    repeat with i from 1 to theDocs
    duplicate art layer "logo" of current document to document i
    end repeat
    repeat with i from 1 to theDocs
    set current document to document i
    tell document i
    set properties of art layer "logo" to {bounds:{0.456666666667, 6.38, 2.88, 6.77}}
    end tell
    end repeat
    end tell
    anyone know what the language is to move the layer around?

    In any language the way to move a layer x,y is to use translate… You will need to do the math from current x,y to required x,y given a distance… A read only property is just that regardless of language… Here is a quick example of how I did this kind of thing using Applescript… I still do the same method now but use the ESTK instead…
    tell application "Adobe Photoshop CS2"
    activate
    -- Store the app settings
    set User_Rulers to ruler units of settings
    set User_Dialogs to display dialogs
    set ruler units of settings to pixel units
    set display dialogs to never
    set Doc_Ref to the current document
    tell Doc_Ref
    -- Store the image res so we can put it back
    set Original_Res to resolution
    -- Change to work at 72 dpi
    resize image resolution 72 resample method none
    -- Move horizontal 1 inch
    translate layer 1 delta x 72 as pixels
    -- Move vertical 1 inch
    translate layer 1 delta y 72 as pixels
    -- Read the bounds propety
    set Layer_Bounds to bounds of layer 1
    log Layer_Bounds
    -- Move the layer using bounds to top/left
    translate layer 1 delta x -(item 1 of Layer_Bounds) as pixels
    translate layer 1 delta y -(item 2 of Layer_Bounds) as pixels
    -- Put back the image res
    resize image resolution Original_Res resample method none
    end tell
    -- Put back the app settings
    set ruler units of settings to User_Rulers
    set display dialogs to User_Dialogs
    end tell
    You should get the general idea of how this works from this. It should move the first layer across 1 inch, down i inch then put it top/left. It assumes you have a layer that is not a background layer nor is it locked in any way…

  • AppleScript PhotoShop Resize Times Out?

    Hi all,
    I've found what seems to be a pretty decent image resize applescript to use with photoshop cs3, but every time I try to use it, it just hangs on the sizing image dialog box. Anybody have any suggestions?
    tell application "Adobe Photoshop CS3"
    activate
    -- set parameters
    set my_files to choose file with prompt "Choose some files" default location (path to desktop) with multiple selections allowed
    set destination_folder to choose folder with prompt "Choose destination folder" default location (path to desktop)
    set destination_path to destination_folder as string
    set sizeofthumbnail to text returned of (display dialog "Set size of thumbnail" default answer "100")
    set sizeofthumbnail to sizeofthumbnail as integer
    set output_quality to text returned of (display dialog "Set quality of final output" default answer "60")
    set output_quality to output_quality as integer
    -- for each file
    repeat with my_file in my_files
    set original_extension to name extension of (info for my_file)
    open my_file showing dialogs never
    set my_doc to the current document
    set original_name to the name of my_doc
    set doc_width to width of my_doc
    set doc_height to height of my_doc
    if doc_width > doc_height then
    set new_width to sizeofthumbnail
    set new_height to round (doc_height * (new_width / doc_width))
    else
    set new_height to sizeofthumbnail
    set new_width to round (doc_width * (new_height / doc_height))
    end if
    resize image my_doc width new_width height new_height resample method bicubic sharper
    tell current document
    export in live_folder as save for web with options {class:save for web export options, web format:JPEG, quality:target_quality}
    close saving no
    end tell
    end repeat
    end tell
    -- finishing touches
    tell application "Finder"
    activate
    open folder destination_folder
    beep
    end tell

    I commented out the export line (I don't have CS3, only an old version of CS) and it seems to work fine. the problem, then, is with the export line, and (at a guess) the issue might be the odd way you've specified the document. instead of using the export command in a document tell block, try 'export current document in live_folder as...' and see if that helps.

  • $300 For 2 Photoshop/Illustrator scripts- Applescript Preffered

    I have been meaning to write these myself for months, but have been too busy, so we're trying to hire someone.
    We would prefer these to be mostly Applescript, because I know Applescript and will be able to modify/maintain them, but we might consider all Javascript if there are no bites on Applescript.
    There are probably bits in here that are not accessible to Applescript, that would need to be in Javascript. I think color overlays are not in the scripting dictionary and need to be figured out with scripting listener. That's fine, as necessary, to call Javascript from an Applescript. We just want it to be in Aplescript as much as possible.
    If you're interested, please contact me:
    [personal info removed by moderator]
    I assume that if you're interested, you'd want more information. We can provide example files in the "before" and finished states, talk or email about any questions you have, and I also have examples of some steps of the scripts functioning for reference.
    Here is the outline of the two scripts:
    Script 1: Assign Color Overlay
    Overview:
    This script would need to do the following in Adobe Photoshop. The script will be run from a command key.
    Script Steps:
    1. Ideally, read the current swatches on the swatch pallet in Photoshop. If this is a pain/impossible, then we’re open to getting this info from somewhere else. We can save out the info needed as a .csv or .txt and the script can just load it from there.
    2. When the script is run, it presents a dialog with a list of the colors from the swatch pallet. The user chooses a color from the list.
    3. It applies the color selected as a "Color Overlay" Layer Effect to the currently selected layer. If the layer already has a color overlay effect, it updates it to the selected color. The color overlay effect is applied with the “Screen” blending mode.
    4. It changes the layer name to the name of the color that was selected
    Script 2: Save Files and Convert Photoshop File to Spot Color Raster EPS
    Overview:
    The script will save out the active Photoshop file in multiple copies in different ways, place data on the clipboard, and then use Illustrator to convert one of the Photoshop files to a different format.
    The open file when the script is run will always be a Photoshop file with layers, with the topmost layers named by colors as specified by the above “Script 1.” The files can have an arbitrary number of layers, but will all be in this format:
    first layer [Some Color Name]
    arbitrary number of additional layers, each with color names
    Shirt [ <- this is a solid color layer]
    Art [<- this is a single group containing arbitrary layers]
    Script Steps:
    1. The active file is saved out exactly as it is. When the script’s run, it presents a save dialog. The operator chooses the save folder location and file name. I will refer to this as “The Save Folder” The script will then check to see if there’s an “Art” folder in The Save Folder. If there is, it saves the file there. If not, it creates the “Art” folder and saves it there. If the file already exists, it automatically overwrites and does not provide a dialog about it.
    2. Another copy is saved using “Save For Web. The original file was at 300 dpi and this copy is saved out bicubic down sampled to 72 dpi with the same inch dimensions. The save settings are {JPEG – High, Progressive – off, Optimized – on, Embed Color profile – off, Quality – 72, Blur – 0, Matte – none, Convert To sRGB – yes}   This one has the same file name as the first copy (except for the file extension) and is saved in The Save Folder.
    3. A flat copy of the art at the same dimensions but downsampled to 18 dpi is placed on the clipboard.
    4. An intermediate file for Illustrator conversion is saved. This should probably be saved in a new folder in The Save Folder called “Intermediate Files.” This folder needs to be checked for and created only if necessary. The file should have a naming scheme such as “Intermediate File” & [existing file name]. This file is identical to file 1, except:
    - the shirt layer and art folder are removed. This should probably be scripted as deleting the layer named “shirt” and everything below it in the file.
    - all the color overlays are removed (or turned off)
    5. Close the file.
    6. Open the intermediate file in Illustrator with the “Convert Layers to Objects” option.
    7. Select All
    8. Edit -> Edit Colors -> Convert to Greyscale
    9. Cycle through each layer one at a time and change the fill color to the swatch from an open Illustrator swatchbook called “Current Inks” with the same name as the layer name.
    To clarify this previous step, our artists will be working off the same .ASE color swatchbook in both Photoshop and Illustrator. In Photoshop, the colors from this .ASE will be used as color overlays on layers. The file needs to be imported to Illustrator and have the same colors applied as fill colors of the raster objects that were the Photoshop layers. The color information is being conveyed from Photoshop to Illustrator through the layer names in Photoshop.
    10. Save this file to The Save Folder as a .AI with the same name and “CONV”
    11. Delete the intermediate file.

    @Jongware -- thanks for your thoughts! I hated to think that I was going to be on the plank all by myself here... :-)
    @TomT-shirts -- no worries. Given your articulate RFP, I suspected that something was amiss here, not the least of which was the fact that the numbers seemed to have been misinterpreted, I knew what was happening and probably why it was happening before I posted, so I was just trying to diplomatically (or not?!?) trying to alert both parties of a problem. You are (in my opinion and I think others' as well) perfectly fine in posting the listing here. How else would anyone know about your need and a possible opportunity for folks here that are able to help? SO that's all good. Where I (at least) felt the problem was/is is the continuing of the "transaction" "on-forum", which you clearly explained how that happened. Empathetic to your potential public disclosure of additional private information (as noted by @Jongware) is why I thought that it might be a good idea to step up and implicitly suggest taking it off-forum, not even knowing "how" it happened on your end. Also good points by @Jongware about the closure of such threads, something that I never really thought about.
    So, at least from my perspective, keep 'em coming (at least the projects and questions :-)) and please do let everyone know that you were well taken care of by the folks here on this forum by a comment afterwards to "close" the thread as suggested by @Jongware. A pretty smart group they are (myself humbly excluded).
    And -- best of luck on your project!!!! :-)

  • Printing from Photoshop using AppleScript

    I am working on a project that will automatically print an image that is moved to a folder.
    Right now, I have the following working: the image from my camera saves to a folder on my desktop, then applescript opens the image in Photoshop and runs an action on it that resizes it, crops it, and then re-saves it into a different folder. Here's where my problem starts...
    My printer - an Epson R800 - does not have a default paper size of 5x7 borderless. That selection has to be made in Photoshop, however, Photoshop actions will not capture paper settings. (Which I think is sooooo stupid, but that's another issue.)
    When the image is dropped in the second folder, it currently automatically prints, but on "letter" size paper.
    I need to script the following:
    Tell Photoshop CS4 to open the image (well, I can do that), but then select the correct paper size (5x7 borderless), and print. I've tried a few different things and they aren't working.
    Any help would be appreciated!
    Thanks,
    Michelle

    Here is a starter that is working just fine at work where I have access to CS2 and printers…
    -- A path to an image file as text
    set PrintImage to (path to desktop as text) & "HE2015.tif"
    tell application "Adobe InDesign CS2"
    activate
    -- Turn off the app dialogs
    tell script preferences
    set user interaction level to never interact
    end tell
    -- Get the new document preset
    set DocPreset to document preset "A4-P" -- Change here
    -- Make our new doc
    set PrintDoc to make new document at beginning ¬
    with properties {document preset:DocPreset}
    -- Get the printer preset
    set PrintPreset to printer preset "Xerox A3-P-SEF" -- Ditto Here
    tell PrintDoc
    set DocWidth to page width of DocPreset
    set DocHeight to page height of DocPreset
    -- Add a rectangle to hold the image
    set ImageFrame to make new rectangle at beginning ¬
    with properties {geometric bounds:{0, 0, DocHeight, DocWidth}}
    tell ImageFrame
    -- Put our image in the rectangle
    place PrintImage as alias
    -- Fit our image to fill box keeping proportions
    tell image 1
    fit given fill proportionally
    fit given center content
    end tell
    end tell
    print using PrintPreset without print dialog
    end tell
    end tell
    There are two strings that you will need to change one for a 'new document preset' and the second for a 'print preset'…
    The example just uses an image off my desktop to test with… Any problems post in the Indesign forum as this no longer belongs here…

  • Convert photoshop action to applescript?

    Hi all. I hope you might be able to help me out. I'm looking for a way to convert photoshop actions i've created to applescript. I can't seem to find any sources to do this. I did find a script to convert actions to javascript, but as i don't have a good working knowledge of JS it's not as helpful as Applescript would be.
    Thanks in advance for any help pointing me in the right direction
    -andrew

    [email protected] wrote:
    > I'm looking for a way to convert photoshop actions i've created to applescript. I can't seem to find any sources to do this. I did find a script to convert actions to javascript, but as i don't have a good working knowledge of JS it's not as helpful as Applescript would be.
    At the core of an Action is series of executeAction invocations that correspond
    to the steps of the Action. This is what the ScriptingListener output
    essentially is, as described in the Action Manager section of the PSCS3
    Scripting Guide.
    There is no Action Manager API for AS. Your only option in AS is to call JS
    code, as is described in the Scripting Guide. You can either use the code
    generated by the ScriptingListener plugin, or you can use my Action->JavaScript
    translation script (which you've already found). To the best of my knowledge,
    there are no other solutions if you program in AS.
    -X
    for photoshop scripting solutions of all sorts
    contact: [email protected]

Maybe you are looking for

  • Vendor - Payment run issue

    Hi All, When we run the payment run, we are having problems with some of the vendors, because even they are set as payment method "T", transfers; when we run the payment run it shows as "C" payment with check. Kindly, advise me on the same. Quick res

  • Switching from a 4g to 3g phone and then back ..weekly.. sim card?

    If this has been asked already I apologize...I've seen different answers and I just want to get it straight. If I have a 4g phone ( sim card) and want to go back to a 3g phone (I'd like to do this several times a week). How can I do this without requ

  • 3rd party map in nokia

    hi, does anyone know can we install 3rd party map onto Navigator 6110??

  • Secure wireless on existing network

    My boss wants to provide internet wireless capability to service customers while they are waiting. We have a small LAN with forty workstations and only one port on our router to the outside. I am worried about security. I was thinking of putting a wi

  • Songs Stuttering/Skipping/Stalling?

    I'm not really sure if this is the right place to ask this... Anyway, I've been having some issues lately playing songs in itunes on my computer. Many of the purchased songs have been playing slowly, stuttering along and making it difficult (and irri