Hi
I am new to scripting Indesign CC and am trying to learn the syntax.
How do I assign styles to text being added to and existing text frame.
Here is what I am doing so far to test this issue. It’s simple I know
This works ok but now I need to style each new item as it is being added.
Thanks in advance for help with this.
property theLetter : "A. "
property prodName : “The Name of the Product”
property newOrNot : “NEW”
property thePrice : “$14.99”
property theCopy : “Green Stuff can always make you smarter and blah blah blah !” & return & “More interesting data about the product that you might want to know”
property TheLastBit : “Some other stuff HERE …”
property theTADA : “------< Ta Da !$! >-----”
repeat with x from 1 to 3
tell application “Adobe InDesign CC”
tell parent story of text frame x of page 1 of document 1
set applied font to "Arial"
set contents of insertion point -1 to theLetter & prodName & " "
end tell
end tell
tell application "Adobe InDesign CC"
tell parent story of text frame x of page 1 of document 1
set contents of insertion point -1 to newOrNot & " "
end tell
end tell
tell application "Adobe InDesign CC"
tell parent story of text frame x of page 1 of document 1
set contents of insertion point -1 to thePrice & return
end tell
end tell
tell application "Adobe InDesign CC"
tell parent story of text frame x of page 1 of document 1
set contents of insertion point -1 to theCopy & return
end tell
end tell
tell application "Adobe InDesign CC"
tell parent story of text frame x of page 1 of document 1
set contents of insertion point -1 to TheLastBit & return
end tell
end tell
tell application "Adobe InDesign CC"
tell parent story of text frame x of page 1 of document 1
set contents of insertion point -1 to theTADA & return & return
end tell
end tell
end repeat
Oakley
Model: iMac 10.9, IndesignCC, Script DeBugger5
AppleScript: 2.6.1
Browser: Safari 537.75.14
Operating System: Mac OS X (10.8)