Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Overprint and spot a (bmp) Tiff file (applesript)

Community Beginner ,
Jun 10, 2011 Jun 10, 2011

My script creates a new document, places a file you select on layer 1. Asks if there is a WHITE file, if so, creates a new layer WT and places the file you select on that layer. Then creates a new layer named AD and adds the selected file.

What I need is for the WT on the white layer and the AD files on the AD layer to have the attribute overprint fill checked and they need to be 'colored' with the corrosponding spot color (defined in the script).  I can't get it to work on the place using the properties. Not sure how to do this.

tell application "Adobe Illustrator"
     make new document
     make new spot in current document with properties {name:"WT", color:{cyan:10, magenta:0, yellow:0, black:0}}
     make new spot in current document with properties {name:"AD", color:{cyan:0, magenta:0, yellow:1, black:0}}
end tell

-- Select the file(s) you would like to place in the front Illustrator document.
set file_refs to choose file with prompt "Select Front." with multiple selections allowed without invisibles

-- Count the number of files selected.
set total_files to count item in file_refs

set embed_option to "Yes"

-- Iterate through every file and perform the place_files subroutine.
repeat with i from 1 to total_files
     set active_file to item i of file_refs
     place_files(active_file, embed_option)
end repeat

on place_files(file_ref, embed_file)
     tell application "Adobe Illustrator"
          set placed_file to make new placed item in document 1 ¬
               with properties {file path:file_ref, position:{0.0, 0.0}}
          if embed_file = "Yes" then
               embed placed_file
          end if
     end tell
end place_files
display dialog "Does this tattoo have WHITE?" buttons {"Yes", "No"} default button 2
if the button returned of the result is "Yes" then
     tell application "Adobe Illustrator"
          make new layer in current document with properties {name:"WT"}
     end tell
    
    
     -- Select the file(s) you would like to place in the front Illustrator document.
     set file_refs to choose file with prompt "Select WHITE." with multiple selections allowed without invisibles
    
     -- Count the number of files selected.
     set total_files to count item in file_refs
    
     set embed_option to "Yes"
    
     -- Iterate through every file and perform the place_files subroutine.
     repeat with i from 1 to total_files
          set active_file to item i of file_refs
          place_files(active_file, embed_option)
     end repeat
end if

tell application "Adobe Illustrator"
     make new layer in current document with properties {name:"AD"}
end tell


-- Select the file(s) you would like to place in the front Illustrator document.
set file_refs to choose file with prompt "Select ADHESIVE." with multiple selections allowed without invisibles

-- Count the number of files selected.
set total_files to count item in file_refs

set embed_option to "Yes"

-- Iterate through every file and perform the place_files subroutine.
repeat with i from 1 to total_files
     set active_file to item i of file_refs
     place_files(active_file, embed_option)
end repeat


tell application "Adobe Illustrator"
     tell document 1
          set visibleBounds to visible bounds
          set theArtboards to artboards
          set lastArtboard to count theArtboards
          repeat with thisArtboard from 1 to lastArtboard
               set theArtboard to item thisArtboard of theArtboards
               set artboard rectangle of theArtboard to visibleBounds
          end repeat
     end tell
end tell

TOPICS
Scripting
979
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Guide , Jun 11, 2011 Jun 11, 2011

Setting the overprint is fairly straight forward its just a boolean property so this should help…

tell application "Adobe Illustrator"

activate

tell document 1

set spotA to make new spot with properties {name:"WT", color:{cyan:100, magenta:0, yellow:0, black:0}}

set spotB to make new spot with properties {name:"AD", color:{cyan:0, magenta:100, yellow:0, black:0}}

--

log (count of raster items)

colorize the first raster item raster color color of spotA

set overprint of the first raster item to tru

...
Translate
Adobe
Guide ,
Jun 11, 2011 Jun 11, 2011

Setting the overprint is fairly straight forward its just a boolean property so this should help…

tell application "Adobe Illustrator"

activate

tell document 1

set spotA to make new spot with properties {name:"WT", color:{cyan:100, magenta:0, yellow:0, black:0}}

set spotB to make new spot with properties {name:"AD", color:{cyan:0, magenta:100, yellow:0, black:0}}

--

log (count of raster items)

colorize the first raster item raster color color of spotA

set overprint of the first raster item to true

end tell

end tell

The colorize line has never worked for me although it looks like its done it… If you select the item it does NOT appear mapped to the swatch in the palette so that can't be quite right. Its fine for none spots but something is not OK for spots…

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 22, 2011 Jun 22, 2011
LATEST

Thanks for your help! The overprint worked.

The spot doesn't work. As far as I can tell, it is not an option to spot a raster item through applescript. The script you supplied does what it says..makes the object the color OF the spot. My solution was to create the spot color in photoshop. Changing it to a duotone and naming the spot color that way, and then save it as a photoshop eps. When this file is palced into illustrator it retains that spot color info. yay

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines