Re: InDesign 2.0 Questions
Re: InDesign 2.0 Questions
- Subject: Re: InDesign 2.0 Questions
- From: Shane Stanley <email@hidden>
- Date: Mon, 15 Apr 2002 08:06:19 +1000
On 15/4/02 4:33 AM +1000, Jay Young, email@hidden, wrote:
>
I have 2 InDesign 2.0 questions. First, is there an easier way to add a
>
character after another character without overwriting anything? I would
>
like to do something like:
>
>
-----------------------------------------
>
tell application "InDesign 2.0"
>
tell text frame 1 of document 1
>
copy return to after character -1 of last paragraph
>
end tell
>
end tell
>
-----------------------------------------
Think insertion point:
set contents of insertion point -1 to return
>
My second question is:
>
>
Is there a way in InDesign 2.0 to set up something like a Delimit
>
Table? In Quark I can do something like:
>
>
----------------------------------------
>
tell application "QuarkXPress"
>
activate
>
set every delimit item of delimit table 1 to can be contained
>
in word set delimit item (ASCII character 9) of delimit table 1 to
>
not word member
>
--code stuff
>
end tell
>
---------------------------------------
>
>
This way I can make words split by tabs instead of spaces. A much
>
quicker way to set styles, etc. to certain words in the whole document
>
instead of going through each paragraph one at a time.
There's no equivalent, sadly. But text style ranges can be very useful --
for example:
tell application "InDesign 2.0"
activate
tell document 1
set n to text returned of (display dialog "Which column do you want
styled?" default answer "")
set allStyles to name of character styles of document 1
set thestyle to (choose from list allStyles with prompt "Choose a style:")
set thestyle to character style (item 1 of thestyle) of document 1
set tabStyle to (make character style with properties {name:"XXXX Tab
style"} at document 1)
tell parent story of text frame 1
set applied character style of every character whose contents = (tab as
text) to tabStyle
try
set applied character style of text style range (n * 2 - 1) of every
paragraph to thestyle
end try
delete tabStyle
end tell
end tell
end tell
--
Shane Stanley, email@hidden
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.