Forum Replies Created
-
AuthorPosts
-
Rhiannon Miller
MemberOK, rather than try and map the new styles to the old ones automatically (how would ID know which ones to use?), I'm playing with the idea of creating a dialog box for each paragraph style in the document in turn, so I can type in the new name. (Yes, I know I've probably already taken more time than it would take to click on each style manually, but I've never written a script with a dialog in it before so I thought I'd take the opportunity to learn.)
I've adapted one of the examples in the Applescript tutorial. So far I have:
tell application “Adobe InDesign CS5”
tell active document
set allParaStyles to every paragraph style
repeat with i from 1 to count of allParaStyles
set myParaStyle to item i of allParaStyles
set myOldStyleName to name of myParaStyle
set myDialog to make dialog
tell myDialog
set name to “Rename paragraph style”
set myDialogColumn to make dialog column
tell myDialogColumn
–Create a text entry field.
set myNewStyleName to make text editbox with properties {edit contents:”myOldStyleName”, min width:180}
end tell
end tell
set myResult to show myDialog
if myResult is true then
–Get the settings from the dialog box.
set name of myParaStyle to edit value of myNewStyleName
–Remove the dialog box from memory.
destroy myDialog
else
destroy myDialog
end if
end repeat
end tell
end tell
But this gives me an error:
error “Adobe InDesign CS5 got an error: Can’t make class dialog.” number -2710 from dialog to class
What am I missing?Rhiannon Miller
MemberYes, I'd thought of that, but this is to be the new style template: once I've finalised the styles in InDesign I'll export it back to RTF to create the document template for Word files.
Besides, it's easier for everyone if the styles have the same names in both InDesign and Word.
June 9, 2010 at 5:52 am in reply to: Italics appear from importing a word document into indesign #55970Rhiannon Miller
MemberI find that if you have a character style selected before you import the text (i.e. you have clicked on that character style while the cursor is not in a text frame), then all the imported text has that character style applied. Try reimporting the text, making sure that no character style is selected.
June 8, 2010 at 10:52 pm in reply to: Italics appear from importing a word document into indesign #53015Rhiannon Miller
MemberI find that if you have a character style selected before you import the text (i.e. you have clicked on that character style while the cursor is not in a text frame), then all the imported text has that character style applied. Try reimporting the text, making sure that no character style is selected.
Rhiannon Miller
MemberYou were right, changing to the single-line composer fixed it. (So did changing the spaces to fixed spaces, but that's less flexible, as you pointed out.)
Thanks so much!
Rhiannon Miller
MemberYou were right, changing to the single-line composer fixed it. (So did changing the spaces to fixed spaces, but that's less flexible, as you pointed out.)
Thanks so much!
Rhiannon Miller
MemberI do this on occasion. I normally create an empty column the width of the two spine margins in order to ensure that there's nothing going over the spine. I've never heard of it being a problem. However, I can't imagine that you could do this automatically.
Rhiannon Miller
MemberI do this on occasion. I normally create an empty column the width of the two spine margins in order to ensure that there's nothing going over the spine. I've never heard of it being a problem. However, I can't imagine that you could do this automatically.
Rhiannon Miller
MemberOo, that script looks useful. It does about half of what I'd need. Now to find some way to specify a number range.
Rhiannon Miller
MemberYes, I can get that far, but I don't see how to tell 53 to be 54 and in the same search tell 54 to be 55, 55 to be 56 and so on. And that's a hell of a big search string to type out anyway – is there no way to define a number range?
Rhiannon Miller
MemberWell, there's something wrong with that black bar on my computer, because now that I'm logged in it says things like
Welcome back, orielwen !
<a href=”https://creativepro.com/your-account”>Your AccountLog out
(with the 'out' of 'Log out' on a separate line), so that the HTML code for the link is visible.
Rhiannon Miller
MemberOo, that script looks useful. It does about half of what I'd need. Now to find some way to specify a number range.
Rhiannon Miller
MemberYes, I can get that far, but I don't see how to tell 53 to be 54 and in the same search tell 54 to be 55, 55 to be 56 and so on. And that's a hell of a big search string to type out anyway – is there no way to define a number range?
Rhiannon Miller
MemberWell, there's something wrong with that black bar on my computer, because now that I'm logged in it says things like
Welcome back, orielwen !
<a href=”https://creativepro.com/your-account”>Your AccountLog out
(with the 'out' of 'Log out' on a separate line), so that the HTML code for the link is visible.
-
AuthorPosts
