[AS CS6] paragraph content replace
hi,
inspired old script found in indesign magazine replacing table data, document , keeping paragraph styles of receiving document, i'm trying same thing multiple paragraphs. know can copy , paste without formating 1 document , keep style. i'm trying same thing on multiple paragraphs selection not same paragraph styles. following script samething copying , pasting without formating on multiple paragraphs selection.
tell application "adobe indesign cs6"
if not (exists document 2) then
beep
activate
display dialog "this script requires 2 documents open, equivalent table areas selected." buttons {"ok"}
return
end if
set paracount1 to count of paragraphs of selection of document 1
set paracount2 to count of paragraphs of selection of document 2
if (paracount1 is not equal to paracount2) then
beep
activate
display dialog "the number of paragraphs don't match." buttons {"ok"}
return
end if
set contents of selection of document 2 to contents of selection of document 1
end tell
i've tried couple of thing repeating loops can't figure out out how loop in 2 documents @ same time , having item document 1 replace coresponding item in document 2.
anybody done before? pointers?
i'd have:
contents of paragraph 1 of document 1 contents of paragraph 1 of document 2
contents of paragraph 2 of document 1 contents of paragraph 2 of document 2
contents of paragraph 3 of document 1 contents of paragraph 3 of document 2
tia
jeff
just let guys know found solution. in indesign applescript guide. there sample script called "replace text" , trick.
jeff
More discussions in InDesign Scripting
adobe
Comments
Post a Comment