Back

If your email is not recognized and you believe it should be, please contact us.

Forum Replies Created

Viewing 14 posts - 121 through 134 (of 134 total)
  • Author
    Posts
  • in reply to: Changing the name of every style in a document #53044

    OK, 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?
    in reply to: Changing the name of every style in a document #53043

    Yes, 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.

    I 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.

    I 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.

    in reply to: Grep styles with No Break #55780

    You 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!

    in reply to: Grep styles with No Break #52788

    You 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!

    in reply to: A single table that spans both pages of a spread #55605

    I 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.

    in reply to: A single table that spans both pages of a spread #52608

    I 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.

    in reply to: GREP search to increment numbers? #54200

    Oo, that script looks useful. It does about half of what I'd need. Now to find some way to specify a number range.

    in reply to: GREP search to increment numbers? #54198

    Yes, 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?

    in reply to: No login on forum pages? #54197

    Well, 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 !

    Log out

    (with the 'out' of 'Log out' on a separate line), so that the HTML code for the link is visible.

    in reply to: GREP search to increment numbers? #51187

    Oo, that script looks useful.  It does about half of what I'd need.  Now to find some way to specify a number range.

    in reply to: GREP search to increment numbers? #51185

    Yes, 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?

    in reply to: No login on forum pages? #51181

    Well, 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 !

    Log out

    (with the 'out' of 'Log out' on a separate line), so that the HTML code for the link is visible.

Viewing 14 posts - 121 through 134 (of 134 total)