Replace all the text in the text book example

Hello comrades,.

Is there a way to replace all text content in a book with some sample text using Extendscript?

If so, could you please point me to the relevant API?

Thank you in advance for your help!

OK, I thought about it. Here's a script that works through all the text in the main stream after opening the document.

var oDoc is app. ActiveDoc;

var oDoc.TextSelection = oRange;

var oPgf = oRange.beg.obj;

var oTLoc1 = new TextLoc;

var oTLoc2 = new TextLoc;

var renounce = new TextRange;

var sNewTxt;

While (oPgf.ObjectValid ())

{

var oTexts = oPgf.GetText (-1);

oTLoc1.obj = oPgf;

oTLoc2.obj = oPgf;

for (i = 0; i< otexts.length;="" i++="" )="">

If (.dataType oTexts [i] == Constants.FTI_String) {}

oTLoc1.offset = oTexts [i] risk;

oTLoc2.offset = oTexts [i] + oTexts [i].sdata.length risk;

oTRange.beg = oTLoc1;

oTRange.end = oTLoc2;

oDoc.TextSelection = renounce;

oDoc.Clear (0);

sNewTxt = oTexts [i].sdata.replace (/ [a - z] / g, 'x');

sNewTxt = sNewTxt.replace (/ [A - Z] / g, 'X');

oDoc.AddText (oTLoc1, sNewTxt);

}

}

oPgf = oPgf.NextPgfInDoc;

}

Tags: Adobe FrameMaker

Similar Questions

  • Replace all the images in different format

    Hi all

    So I know just like the modification of some files by renamming or moving folder and open the project and then that it points to the new directory/whatever and which works very well.

    I help a friend who is sounding a customer is a mess and I need to find a quick way to solve this problem.

    Long story short, the poor kid turned on a redcam but had all converted files .mov 720 x 480 and published in first things. Well... The guys, its impossible to get an OMF from there so I got everything and it imported in first pro and started the repair of some of the bits upward and exported the OMF. Now I've discovered that the child always has the R3D files. so I would replace all the files to .mp4 and .mov in this project to the eponymous r3d with just the extension of r3d.

    Feeling when I tried to move the other files and start to replace I had to manually locate each r3d and which would take forever...

    I want to change the files of much better quality ones, a good installation sequence, keeping its changes and then speedgrade for him but I'm not willing to invest the time to manually replace each file.

    any ideas?

    You may need to do this one at a time if each R3D file is in its own folder.

  • replace all the ',' inside the string

    I have a long string and pl/SQL, I want to replace all the ',' with ', null, '.

    Can I use replace function as:
    prepare_insert: = replace (prepare_insert, ', ', ', null,');

    but it will not replace Prime ',' not all. How can I replace all?

    It works fine in your case also.

    ',' replace will replace the first ',' to ', null, ', and then he would find the second ',' and to replace it ', null,'.

    select replace(',,,,',',,',',null,') from dual;
    
    ,null,,null,
    

    There is no combination of 2nd & 3rd "," for the replacement.
    but only one, 1st & 2nd, 3rd & 4th. That's all.

    Doing twice replace() will give you what you want:

    select replace(replace(',,,,',',,',',null,') ,',,',',null,') from dual;
    
    ,null,null,null,
    

    Published by: PhoenixBai on August 24, 2010 23:43

  • How can I remove and replace all THE contacts on my iPhone 6 s

    I just got a new iPhone 6s and had my contacts migrated to she an old HTC Android phone at the office of my carrier. Migration not be passed not as planned and all my contacts are screwed up. I would like to delete all contacts and replace them in the good list which is on my MacBook Pro. How is the best way to do it? FYI, I'm long (Senior) Mac user, but a smart phone for novice user. Once I get the old deleted contacts, can I do a direct link to my MacBook via USB? Or should I create an Archive of my contacts and somehow get in the cloud and download it from there? Thanks in advance for your help.

    I fixed this problem myself. Here's how I did it...

    (1) on my new iPhone 6s, I went to settings > iCloud > Contacts and turned on OFF.

    (2) then I went to my MacBook Pro > address book. In my address book on the left hand side there was a list called "ICloud all.» I selected all the contacts in this list and deleted (it has not deleted the list "on my Mac".)

    (3) I went back to my iPhone settings > iCloud and turned the "Contacts" button. Back to my phone button and selecting 'Contacts' verified that there is no left of Contacts on my iPhone.

    (4) go back to my MacBook > addressbook, I copied the 'groups' I wanted to list "all iCloud.

    (5) I did a "hard reboot" on my iPhone and Voila! -all my contacts are now on my iPhone and I could turn the groups on or off because I am pleased.

    NOTE: I could have done the same thing except in step (4) above, I could have copied 'All the Contacts' in the field 'Cloud of all', but I wanted to only certain groups on my phone.

    I hope this helps others with the same problem.

  • How can I replace all the bookmarks menu with another menu of firefox from another computer

    I installed an old Firefox bookmarks, install files by mistake on a new Linux Mint.
    How can I remove the old menu bookmarks and install the new file menu?
    Firefox OS 35 - Mint 17
    Thank you

    You can restore a JSON backup — a backup in the folder bookmarkbackups Firefox automatically creates, or you create a backup.

    Restore a JSON backup will replace all existing bookmarks in contrast to import an HTML backup that merges with existing bookmarks bookmarks.

  • Photosmart 7520: my photosmart HP 7520 do not print: I replaced all the cartridges and always use HP ink cartridges

    My 7520 gives me a message that says: "there is a problem with the printer or ink system. Turn the printer off, then on. If the problem persists, contact HP. »

    It was printing fine, but then it looked like it was getting low on ink. Black began to turn gray and striated. I replaced all ink cartridges. NOTE: I ALWAYS use cartridges HP, new out of the box. I followed your instructions step by step on the site, but it seems to be moot, since I tried everything. I will be so angry if I spent $ 70 on new HP to put in this printer ink and she took a dive. Please suggest solutions. I really should get this impression, am on a deadline.

    I work with a MAC OSX El Capitan system

    Hello

    I suggest remove you the printer cartridges

    Turn on the printer without cartridge. It should start and see the lack of ink.

    now, first install black and see another error.

    If this isn't the case, restart the printer and do the same for the rest of the inks

    She solves the problem or help to identify the defective

    It may be useful

  • How to replace all the Bridge CS6 Stock keywords with Bridge CS5 keyword

    I have CS6 working in a computer other than the one which houses the CS5. CS6 bridge can read CS5 keywords when it opens a 'old' photo but there not his own (not counting the stock of those supplied with the program). How can I replace all keywords CS6 stocks with the key words of CS5?

    Have you tried the Import/export options in the little menu in the top right of the keywords Panel?

  • Why mozilla firefox options synchronization replaces all the new password old password?

    When I sign in account twitter, linkedin, facebook and yahoo all sites informs me that you used your old password? I have change my password all the old almost 5 months before and after 5 months I used Firefox sync my new bookmarks update option, new name of connection sites and new passwords as well, but after that the sync option used, my new password replaced with the old password

    Maybe the 5 month period when this laptop principal was not connected to the Sync had a role to play in your problem. Sync is designed to synchronize Firefox data permanently, not to be started when you want to "data backup", as with a Cloud Computing service. And the password / feature connections has been changed just about this time, I remember well, then maybe who had a role to play in this last issue.

    1. my advice is to unplug all devices sync. 2. then, using computer laptop main with your latest data, reset your synchronization password. Will erase your data from the server, so you can get a fresh load of data to synchronize, and then to other devices when you connect again with the new password. 3 reconnect the computer main sync using the new password. 4. the next day reconnect another device using the new password. Check that connections data is now suitable for this device. 5. If it looks good, plug other devices one by one at a time by using the new password. And if you are using a "mobile version" of Firefox [Firefox for Android or Firefox for iOS] I would wait a few days to make sure that your data on the desktop / computer portable devices is good before you plug one of these devices.

  • PROBLEM - text and the missing fields in all the tools (for example to launch the "image size" box - all fields are lines - no visible text, no measurement input).

    tool text issue.PNG

    Something on your system is wasting police measures or design of the user interface.

    This could be a utility program or the setting of the BONE, and sometimes even third-party plugins ruin the design of the user interface.

  • Blank.gif replacing all the images in a slideshow

    Since the last update, I decided to redo a site for a client. In any case...

    No matter what I do when I export via FTP or HTML page and download the slide show via an ftp server does display all images, only Blank.gif (1 x 1).

    I have a slide show of work on another page (I copied on but still no luck).

    the bottom of the page is also on 500px to the end of the page that is not more in the design.

    [site has been updated across all updates from muse] I rebuilt the site on a new doc with the same question.

    Thank you chris

    link to site

    http://www.workhouse-England.co.UK/

    slideshow of work

    http://www.workhouse-England.co.UK/workhouse-England--autumnwinter-16.html

    We need the .muse file because that's where your code for this slideshow is maintained... I don't want the entire site.

    • Open your site in Muse,
    • GoTo file > save as > and save the site as a new .muse file
    • Open this new file, the muse and delete everything that is not part of the two slide shows with questions
    • Save the .muse (again, only two slideshows) and upload it to a kind of drop box, so we can pick up
  • HP Officejet 6500 E709n Series (replaced all the cartridges and the printer does not print in color).


    The upper part and let the carriage to move to the Center or the left, unplug the printer, remove the ink cart. poser pose on the side, hands gray and remove the printhead with a lint or a coffee filter, hormonaly moisten her and essuyer wipe down the contacts at the back of the print head, wipe were also the printhead sits in the printer, reinstall the print head and ink cart., close the cover, don't hold the #3 on the front of the printer and the plug the unit back in When you download release power the #3 and see if that helps the issue.

  • JavaScript exception: error calling the function of selection: [object error] after the last update of the software Adobe Muse.  I export the html files and load them on my server.  I replaced all the files.  Only happens in IE11

    error.png

    UPGRADE to someone else who may have had this problem.  It's in compatibility mode settings.  Went in IE-tools and unchecked the option to view websites in compatibility mode, also went in the developer tools and changed the document aboard 11 mode.  This fixed the error!

  • How to convert months to all THE PLUGS for example December 5, 2015 to December 5, 2015

    It must have an easy solution.

    My date indicator returns the format DD-MMM-yyyy.

    I need the MMM to be all caps.

    You haven't tried the function of capital letters?

  • How do menu created on the page master overlay all the elements (for example, the slide show) on the pages of the subsites

    I am creating a menu that covers a slide show so that you can still see the slideshow under. I created a menu on my master page, but it appears below the slideshow on a subpage. What I have to work with layers, or how to make it sit ontop of the slide show (and allows to see slides opacity under). Any help gratefully received, I'm banging my head with this one.

    Move the layer containing the menu at the top of the master page and have the slide show in a different layer. To allow a transparency effect in order to be able to view the content behind the menu, select all Menu items and reduce their opacity via the fill options.

    Thank you

    Vinayak

  • How can I get the address book to always open with personal addresses. It opens with "all address books.

    When addressing and e-mail, addresses always open with "all the address book. This book contains many addresses which are not intended for daily use for most of the mail I write or pass. I want to always open with "Personal address book" to shorten the research process. I have not had any problems with this before the last update.

    Firefox does not have email or have an address book, it is strictly a web browser.

    If you use Firefox to access your e-mail, you use "webmail". You must seek assistance from your service provider or a forum for this service.

    If your problem is with Mozilla Thunderbird, let know us and we can move this thread to the queue of Thunderbird. This issue is currently in the queue of Firefox to get answers.

Maybe you are looking for