After the creation of these character styles, apply clear replacements...

Hello world

After you import the Word document into InDesign CS3 in some paragraphs, there are some substitutions of style. InDesign formatting styles are not correctly designed with paragraphs. Even if that word styles are mapped with InDesign styles exactly. If I select all paragrahs and click on the 'Clear the replacements' option in the palette paragraph styles, all InDesign formatting styles are applied correctly, but the character style formatting are removed. So I planned to create the script for each font style character style and each formatting characters. After doing this I can clear overrides paragraph hassle styles. I have created the script to create styles for characters and formatting his job very well, but when I tried to run this script for the 2nd time in the same document that it showing an error inside. Please find below my script and it is too large,

------------------------------------------------------------------------------------------ -------------------

To find the police and setting styles in form and its replacement by styles of characters
Script for CS3

inDesign #target
myDoc var = app.activeDocument;
If (myDoc.characterStyles.item ("Itl") == null) {}
var Itl = myDoc.characterStyles.add ({name: "Itl", fontStyle: "Italic"}) ;}
If (myDoc.characterStyles.item ("bl") == null) {}
BL var = myDoc.characterStyles.add ({name: "bl", fontStyle: "Bold"}) ;}
If (myDoc.characterStyles.item ("bItl") == null) {}
bItl var = myDoc.characterStyles.add ({name: "bItl", fontStyle: "BoldItalic"}) ;}
If (myDoc.characterStyles.item ("bItal") == null) {}
Bollet var = myDoc.characterStyles.add ({name: "bItal" fontStyle: "Bold Italic"}) ;}
If (myDoc.characterStyles.item ("sb") == null) {}
SB var = myDoc.characterStyles.add ({name: "sb", fontStyle: "Semibold"}) ;}
If (myDoc.characterStyles.item ("sbItal") == null) {}
var sbItal = myDoc.characterStyles.add ({name: "sbItal", fontStyle: "Semibold Italic"}) ;}
If (myDoc.characterStyles.item ("blk") == null) {}
BLK var = myDoc.characterStyles.add ({name: "blk", fontStyle: "Black"}) ;}
If (myDoc.characterStyles.item ("obl") == null) {}
OBL var = myDoc.characterStyles.add ({name: 'obl', fontStyle: "Oblique"}) ;}
If (myDoc.characterStyles.item ("li") == null) {}
Li var = myDoc.characterStyles.add ({name: "li", fontStyle: "Light"}) ;}
If (myDoc.characterStyles.item ("liItal") == null) {}
var liItal = myDoc.characterStyles.add ({name: "liItal", fontStyle: "Light Italic"}) ;}
If (myDoc.characterStyles.item ("sup") == null) {}
var sub = myDoc.characterStyles.add ({name: "sup", position: Position.superscript}) ;}
If (myDoc.characterStyles.item ("sub") == null) {}
void var = myDoc.characterStyles.add ({name: "sub", position: Position.subscript}) ;}

app.findTextPreferences = NothingEnum.nothing;
app.changeTextPreferences = NothingEnum.nothing;

app.findTextPreferences = null;
app.changeTextPreferences = null;

app.findTextPreferences.fontStyle = "italic";
app.changeTextPreferences.appliedCharacterStyle = Itl;
App.Documents.Item (0) .changeText ();
app.findTextPreferences.fontStyle = "Bold";
app.changeTextPreferences.appliedCharacterStyle = bl;
App.Documents.Item (0) .changeText ();
app.findTextPreferences.fontStyle = "BoldItalic";
app.changeTextPreferences.appliedCharacterStyle = bItl;
App.Documents.Item (0) .changeText ();
app.findTextPreferences.fontStyle = "Bold Italic";
bItal = app.changeTextPreferences.appliedCharacterStyle;
App.Documents.Item (0) .changeText ();
app.findTextPreferences.fontStyle = "Semibold";
app.changeTextPreferences.appliedCharacterStyle = sb;
App.Documents.Item (0) .changeText ();
app.findTextPreferences.fontStyle = "Semibold Italic";
app.changeTextPreferences.appliedCharacterStyle = sbItal;
App.Documents.Item (0) .changeText ();
app.findTextPreferences.fontStyle = 'Black ';
app.changeTextPreferences.appliedCharacterStyle = blk;
App.Documents.Item (0) .changeText ();
app.findTextPreferences.fontStyle = "Oblique";
app.changeTextPreferences.appliedCharacterStyle = obl;
App.Documents.Item (0) .changeText ();
App.Documents.Item (0) .changeText ();
app.findTextPreferences.fontStyle = "light";
app.changeTextPreferences.appliedCharacterStyle = li;
App.Documents.Item (0) .changeText ();
app.findTextPreferences.fontStyle = "Light Italic";
app.changeTextPreferences.appliedCharacterStyle = liItal;

app.findTextPreferences = NothingEnum.nothing;
app.changeTextPreferences = NothingEnum.nothing;

app.findTextPreferences.position = Position.superscript;
app.changeTextPreferences.appliedCharacterStyle = sup;
App.Documents.Item (0) .changeText ();
app.findTextPreferences.position = Position.subscript;
app.changeTextPreferences.appliedCharacterStyle = sub;
App.Documents.Item (0) .changeText ();

function setupFindText (find, change, PT, hidLayers, lockedLayers, lockedStories, masters caseSensitive) {}
app.findTextPreferences = null;
app.changeTextPreferences = null;
try {app.findTextPreferences.findWhat = find} catch (e) {};
try {app.changeTextPreferences.changeTo = change} catch (e) {};
app.findChangeTextOptions.properties = {}
includeFootnotes: (PT == null? false: PT).
includeHiddenLayers: (hidLayers == null? false: hidLayers).
includeLockedLayersForFind: (lockedLayers == null? false: lockedLayers).
includeLockedStoriesForFind: (lockedStories == null? false: lockedStories).
includeMasterPages: (masters == null? false: Masters).
includeCaseSensitive: (caseSensitive == null? false: caseSensitive)
}
} / / end setupFindText
Alert ("DONE");

------------------------------------------------------------------------------------------ -------------------

Please suggest how simply this script and make it run faster that anyone can suggest me. Also suggest me how can add this "Clear Override" syntax with this script. I want to make this very effective script. Thanks in advance to all.

Concerning

Indana

Enough basic syntax, really.

First, as indicated in the documentation, the argument is optional; Second, its default behavior is "All". You get 'all', because you have not provided any argument, and you expected something else. Apparently, you want to clear the formatting only. Just use

myStory[j].clearOverrides(OverrideType.PARAGRAPH_ONLY);

Notice that the documentation indicates the return type of this function is zero; This means that you get no return value, and it is of no use to "store" the result in a variable myOvClr.

Tags: InDesign

Similar Questions

  • Need help/advice on the creation of custom character Style

    Hello comrades!

    I m doing a game using flash cs5 and HAVE 3.0.

    I want to give the player the option to costumize his character.

    Something like this ( http://www.flashninjaclan.com/zzz2832_Anime_Character_Generator.php ).

    After choosing his own style the player will save his character and he will use throughout the game.

    I had planned use drag - move action: Player f.ex.the is drag air style and drop it off at the head of the character.

    However, I n ' t´know how can I save the final result! I have not found a tutorial or document on this subject!

    Could you give me some advice/links?

    Thanks in advance!

    See you soon,.

    Eduardo

    You have 3 options here.

    I'll go from easy to hard:

    1. use a LocalSharedObject to record users decision like a flash, like this cookie the next time it runs your application the character will be always available

    or

    2. save the character under a beautiful string in a database that the user must connect when he starts the game.

    or

    3. use air instead of Flash, then you can write a file with the description of the character that it models to your site amenities AIR application directory

    The first method is by far the easiest.

    Regarding 'how to save the character', using a string representation.

    1st digit could be what he chooses, 2nd tshirt, 3 shoes, 4th wepon etc.

    For example, when he chooses the 4th head, the tshirt of the 7th, 9th place and the 3rd weapon, save "4793' in your local shared object chain and read it on the next time the user starts the application.

  • Problem with XNET start VI after the creation of sessions

    I have a timed loop sending CAN messages via XNET screws. It works great, but I always lose the very first message. It matters little, I send the first message immediately after you create the XNET session or after a few milliseconds.

    The attached screenshot shows the initialization of my four sessions XNET. Although I am starting before the session with an XNET start VI, there is without success to get the first message.

    It seems that the sessions/CAN (selectable cards and HS CAN) interfaces are initialized only after the first call to write XNET. XNET write seems to imply XNET start (see documentation), but the appellant XNET start manually after the creation of sessions does not help.

    What I'm missing to get the interfaces online and ready before you send anything?

    I was able to solve this problem because they did not actually XNET screw sorry for this post.

  • vCAC 6.0 cannot connect after the creation of the tenant

    After the creation of a new tenant for use with vCAC 6.0, I disconnect from the default connection ([email protected]) and continue to go to the new URL and connection. When I do, my connection attempts fail. I followed the documentation and even used this blog entry as a reference to make sure I wasn't missing a step (vCloud Automation Center - vCAC 6.0 - addition of tenants - DailyHypervisor). After trying to connect with a users AD I created, I get the same error "username/password Incorrect name."

    Attached are the screenshots of the new tenant that I created.

    Screen Shot 2014-01-08 at 4.54.19 PM.png

    Screen Shot 2014-01-08 at 4.54.50 PM.png

    Screen Shot 2014-01-08 at 4.55.21 PM.png

    Screen Shot 2014-01-08 at 4.56.59 PM.png

    I didn't know all of the other signs on the site of the community with the people having this same problem, so I'm thinking I'm missing something important/simple. Any help you could provide would be greatly appreciated. Thank you.

    --

    Chris.

    You probably need to configure your domain Alias that your ad server is probably change the domain (if AD is configured to use an alias).

  • a notification is sent after the creation of the VM to a specific group does In addition, an end date can be specified in the creation of the VM at the time of its creation?

    (1) can a notification after the creation of the virtual machine to a person or a specific group?

    (2) during the creation of VM., can an end date being specified with regard to long the virtual machine would be required for?

    Hello

    There are two of them:

    (1) use the workflow of "notification" of the library-> just Mail and build a group (comma seperated or e-mail, Distributor)

    (2) you can program it or build a timer on hold until the date is reached

    Hope this helps

    Christian

  • Tables of contents, not the substitution of character styles applied in chapters

    My table of contents uses not the style of input I select words in the paragraphs that have styles of characters that are applied in the chapter, so some letters, more precisely the parameters, displayed in green, which is well in the chapter but not in the table of contents. I can manually fix this in the table of contents by changing the character to any style after the table of contents was generated, but I don't want to do that. I think it has to happen automatically.

    This should do it:

    (?<=\()[\w, \w)]*(?="">

    It searches the text in parentheses without selecting them.

  • Cannot add the attribute Pro-VO again after the creation of VO.

    Hi all

    Earlier during the creation of the VO, I switched a few columns of EO to VO, and they were defined as calculated attributes.

    Now since I had need of a few more added (enabled/disabled) columns of EO, I rocked them but they are created as transient attributes.

    Even if I'm unable to match to the column in the query, if I click on mapped to the column, or SQL, is not applied do.

    Is it possible to add attribute (columns) calculated of EO to VO, so that I can make transactions through them.

    Thank you and best regards,

    Gauthier

    Hi all

    Just tried it after step and succeeded.

    Please follow the steps if you want to have the EO based attribute (when the transitional attribute is be created instead) below.

    Step 1: Add the column to the table in the SQL query.

    Step 2: Turn the column that you want to use in vol. (it can be created as transitional).

    Apply, save and close the J-developer (to avoid unwanted problems)

    Step 3: File Open XML of the VO.

    This is what it looks like when you have transient attribute:

    <>

    Name = "CreatedByUser".

    IsSelected = "false".

    IsPersistent = "false".

    Precision = "255".

    Type = "Java.lang.String"

    ColumnType = "VARCHAR2".

    AliasName = 'CREATED_BY_USER. '

    SQLType = 'VARCHAR' >

    Step 4:

    Change the tags as below:

    <>

    Name = "CreatedByUser".

    EntityAttrName = "CreatedByUser".

    EntityUsage = "XxxxxXEO".

    AliasName = "CREATED_BY_USER" >

    Please note the name, EntityAttrName and Alias name must be identical to that available in OT.

    Step 5:

    Open Jdeveloper and rebuild the project. Open the VO and check to confirm if it had changed and calculated attribute.

    Thank you and best regards,

    Gauthier

  • Auto character style applies in new tables and imported text

    Hi, I saw a post related to this problem, but it does not solve mine (check the default object style).

    So my problem is that when I import a Word document or I create a new table in InDesign, it is always a character that automatic style applies to my text and I don't really know why, I don't know what kind of option/preference to watch, I was looking in the paragraph/object/table styles, nothing seems to show me the character style that applies by default everywhere.

    Someone has an idea? I'm sure it's an easy problem to solve.

    Thanks in advance!

    Make sure that the standard paragraph is selected before importing the text. Or at least the Style of the paragraph that you want to the text.

  • Add the new SMALL CAPS character style

    Hi scripters

    I am trying to create the new character style. Here's the code to create italic character style bold

    If (myDoc.characterStyles.item ("BI") == null) {}
    myDoc.characterStyles.add ({name: "BI", fontStyle: "Bold Italic"}) ;}

    the amount of the fine. My problem is I want to create the SMALL CAPS character style, what is the syntax for that?

    Thanks in advance

    concerning

    a you are the

    Well, it depends on what small caps you want. If it is small capitals, you can create it with:

    myDoc.characterStyles.add ({name: "SC", capitalization: Capitalization.SMALL_CAPS})

    Otherwise, if you want to OpenType Small Caps (which may or may not work, depending on the font you're using)

    myDoc.characterStyles.add ({name: "SC", capitalization: Capitalization.CAP_TO_SMALL_CAP})

    It's all in the object model viewer. You can find it by going to help-> ExtendScript Toolkit object model viewer

  • Win 7 does not start after the creation of new partition for fileswaping.

    Hello!

    As the header says, Windows 7 does not start. Made a partition to swap files between OS X and Windows 7.

    I saw in a thread that it could be repaired using fdisk. I'm really new to OS X, so I did not really

    know what to do. Writing the result of the controls, I found in the thread.

    I know now there is a warning to the partition AFTER installing Windows.

    Would really appreciate if everyone took some time telling me what to do!

    diskutil list

    / dev/disk0 (internal, physical):

    #: NAME SIZE TYPE IDENTIFIER

    0: GUID_partition_scheme * GB 500,1 disk0

    1: disk0s1 EFI EFI 209.7 MB

    2: Apple_CoreStorage MacBook Hoveddisk 382,5 GB disk0s2

    3: disk0s3 Apple_Boot Recovery 650.0 MB HD

    4: Microsoft database FILDELING 16.6 GB disk0s4

    5: Microsoft Windows HD 100.0 GB disk0s5 data base

    / dev/disk1 (internal, virtual):

    #: NAME SIZE TYPE IDENTIFIER

    0: Apple_HFS Macintosh HD GB + 382,2 disk1

    Logical volume on disk0s2

    AD4E7A3F-9F8E-4734-8B4B-B65587CDD2A1

    Unlocked encrypted

    Fdisk/dev/disk0

    Disk: geometry / dev/disk0: 60801/255/63 [976773168 sectors]

    Signature: 0xAA55

    From end

    #: cyl hd s - cyl hd s id [Start - size]

    ------------------------------------------------------------------------

    1: EA 1023 254 63 - 1023 254 63 [1-409639]

    2: AC 1023 254 63 - 1023 254 63 [409640-747116216]

    3: AB 1023 254 63 - 1023 254 63 Boot Darwin [747525856-1269536]

    4: 0 b 1023 254 63-1023 254 63 [748795392-32403968] Win95 FAT-32

    TPG - v - r see the/dev/disk0

    See the TPG: / dev/disk0: mediasize = 500107862016; SectorSize = 512; blocks = 976773168

    See the TPG: / dev/disk0: MBR suspicious to sector 0

    start index size summary

    0 1 MBR

    1 1 Pri GPT header

    2 32 table GPT Pri

    34 6

    40 409600 1 part TPG - C12A7328-F81F-11D2-BA4B-00A0C93EC93B

    409640 747116216 2 part TPG - 53746F72-6167-11AA-AA11-00306543ECAC

    747525856 1269536 3 part TPG - 426F6F74-0000-11AA-AA11-00306543ECAC

    748795392 32403968 4 part TPG - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

    781199360 262144

    781461504 195311616 5 part TPG - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

    976773120 15

    976773135 32 table dry GPT

    976773167 1 dry GPT header

    Please after the release of

    sudo dd if = / dev/rdisk0s5 account = 1 2 >/dev/null | hexdump - C

    You see the Windows files in the volume of training using the Finder?

  • Sir, I have windows 7, after the creation of PDF files the icon was in solid color red and grey, but now the icon changed to adobe acrobat 7 professional, logo, how can I get the icon or the old logo for my PDF files as the previous icon is very easy to i

    Mr President

    I have windows 7, after creation of the solid color red & gray icon PDF files, but now the icon has changed to adobe acrobat 7 Professional logo, how do I re obtain the icon or the old logo for my PDF files as the previous icon is very easy to identify, also I used acrobat adobe 7 Professional but this problem was not there.

    Hi manojp35249311,

    Acrobat 7 is not compatible with Windows 7, so it's difficult to judge how the application on an incompatible environment will behave.

    Please attach a screenshot so that we can diagnose the problem correctly.

    Kind regards

    Nicos

  • Mail does not work after the creation of iCloud email

    Hello

    After you have configured the email address of iCloud I am unable to use the email, I click on mail, but noting happens, all the functions on the mail is grayed out.  Currently, I use e-mail, but if I want to use iCloud email address I won't be able to any suggestions.  I tried the start and restart but still no joy.

    Can I use iCloud on messages and FaceTime.

    Thank you

    Kind regards

    rachealfromva

    A test, you have a different e-mail account, you can add to see if it works?

  • Qosmio G50 - 10 H can not insatll on SSD Vista after the creation of recovery

    Hi all

    Would really appreciate if I could help on this one:

    I just bought an SSD to replace the regular HDD on my Qosmio. I have created a recovery disc and replacement.
    After choosing my language on the application of recovery, I get the following (in a box BACK) error message:

    Verification of the HDD1
    HDD1 found!
    BIOS 0 is disk
    ERROR: GETHHD download physical disk failed!
    Press a key to continue...

    PC: Toshiba Qosmio G50 - 10H
    SSD: OCZ Solid State Disk Core, 120 GB

    Kind regards

    Hello

    I think that the error message above is displayed because the SSD was not recognized in the BIOS.
    Please check if BIOS has recognized the SSD correctly!

    I m not quite sure, but probably you will not be able to use an SSD instead of HARD drive

    Big names

  • Outlook pst files lost after the creation of new users on PC

    After re-setup of Small Business Server 2003 with a different domain name, I had to then modify the user account from PC on their individual computers. After selecting the new domain and restart the PC, windows XP has treated change as if I created a new user. Windows created new parameters for the user and all Outlook files have disappeared. Windows archive/back them somewhere? Why Windows did create new parameters for the same user?

    Thanks for your help!

    Hi bberry333,

    Your question of Windows is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for the public on the TechNet site. Please post your question in the Sub forum.

    Link:http://social.technet.microsoft.com/Forums/en-US/smallbusinessserver/threads

    With regard to:

    Samhrutha G S - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • After the creation of QR Code, when I instead of the Code, it is empty

    I can create a QR code and it turns out I have try and place it in a blank document, but after that I have the place, the image is crossed & gray. The image of the code does not appear. I had no problem this yesterday...

    as well as to allow object level display

    That is the question. Either turn off the display of object level so the the QR code must conform to the level of the doc control, or select it directly and tell him what to do via the object > display performance > typical display.

Maybe you are looking for

  • Groups of contacts: not all recipients are in the mail

    Until recently, I've only used my laptop for music and photos, and I'm a new user for mail and contacts. I created a group with several contacts. When I want to use it to send an email, however, is only a fraction of the list (the one with a 6 and an

  • Inappropriate, needless use of the SSN on motorcycle Maker

    I was ready to buy a new Moto X after finding that I could now use motorcycle Maker to get a customized version of 32 GB for Verizon Wireless. While checking, credit card in hand, the site asked my social security number and permit number drive. What

  • Photosmart HP: HP Photosmart printer will not print anything other than a Web page

    Someone please help.  I'm so frustrated right now.  My printer has stopped printing another thing than Web pages.  If I try to print a word document, there is nothing to print.  She acts like it is printing but nothing goes on paper.  If I try to pri

  • Want to Notebook: Digital Media Slot

    Hi I just bought a new notebook Envy P/N M9U50av and noticed that the Digital Media Slot smaller than the slot on my Pavilion dv6 P/n WW146av. I called the HP 800 474 6836 store for an adapter and they said that they do not have one, but I could orde

  • HP model 15-d009TU: PASSWORD or POWER ON PASSWORD

    MY LAPTOP SHOW THE ADMINISTRATOR MESSAGE-ENTER PASSWORD OR POWER ON PASSWORD SYSTUM DISABLED PEOPLE IS 93935631. PLS HLP ME