Thanks
Mark
Something like this, I think.
Rem Remove ligatures from all paragraph and character styles
Set myInDesign = CreateObject("InDesign.Application.2.0")
Set myDocument = myInDesign.ActiveDocument
For myCounter = 1 To myDocument.ParaStyles.Count
Set myParaStyle = myDocument.ParaStyles.Item(myCounter)
If myParaStyle.Name <> "[No paragraph style]" And (myParaStyle.Ligatures = True Or myParaStyle.OTFDiscLig = True) Then
If myParaStyle.Ligatures = True Then
myParaStyle.Ligatures = False
End If
If myParaStyle.OTFDiscLig = True Then
myParaStyle.OTFDiscLig = False
End If
End If
Next
For myCounter = 1 To myDocument.CharStyles.Count
Set myCharStyle = myDocument.CharStyles.Item(myCounter)
If myCharStyle.Name <> "[No character style]" And (myCharStyle.Ligatures = True Or myCharStyle.OTFDiscLig = True) Then
If myCharStyle.Ligatures = True Then
myCharStyle.Ligatures = False
End If
If myCharStyle.OTFDiscLig = True Then
myCharStyle.OTFDiscLig = False
End If
End If
Next
Copy the text of the script out of this message and into a text editor, then save the file as plain text with the file extention ".vbs". Put the script in the ~/Program Files/Adobe/InDesign 2.0/Scripts folder, and you'll be able to run it from the Scripts palette.
Thanks,
Ole
Because it's faster. VB evaluating an "If" is very fast compared to ID changing a paragraph style or character style.
Thanks,
Ole
Why bother to test the current state? Why not just switch them off?
I guess it doesn't make a lot of difference.
Dave
It really depends on what you're doing (and on how much of whatever it is). I've noticed that changing paragraph and/or character styles is *much* slower than lots of other stuff.
Thanks,
Ole
Dave
Dave
Mark
What an awesome script! Thanks for the file! It works great!
Art
Glad to hear it works for you. Note that you can use it as a framework to change just about any paragraph or character style attribute you want.<g>
Thanks,
Ole