How to use the find method to search for character format substitutions and FMP?

I strongly suspect that I should be able to use the find method to search for paragraph substitutions and format as these options are available in the Find dialog box. However, because of the excruciating Extendscript documentation from Adobe, I not was able to find the key pieces of information that I need. I found these constants:

  • Constants.FV_FindPgfFormatOverride
  • Constants.FV_FindCharacterFormatOverride

But he has literally no information about them. It is not yet a definition, so I'm actually just a guess. However, I think that I need to somehow use these constant within the parameters of the Find method. Any ideas on how to do it?

You're right, there are still some bugs to work out of the documentation, although it has already improved since I started w / Extendscript last summer.

Find two constants must be defined as the ival for a PropVal FindObject, for example:

var myDoc is app. ActiveDoc;

var docStart = myDoc.MainFlowInDoc.FirstTextFrameInFlow.FirstPgf;

tloc var = new TextLoc(docStart,0);

var findParams = AllocatePropVals (1);

findParams [0].propIdent.num = Constants.FS_FindObject;

findParams [0].propVal.valType = Constants.FT_Integer;

findParams [0].propVal.ival = Constants.FV_FindCharacterFormatOverride;

myDoc.Find (tloc, findParams);

Depending on what you're trying to accomplish, you can also take a look at the property FormatOverride of the Doc, bmp and item objects.

Tags: Adobe FrameMaker

Similar Questions

  • How to use the find method to search for multiple items in a single paragraph?

    I'm desigining a script to find all instances where ctrl + b and ctrl + i are applied to body text and then replace the format of these characters replaced with chartag italic or bold.  Here's what the script is supposed to do:

    1. put the find method in a while loop that overrides seeks format character.
    2. If a substitution of format character is found, pass the text range returned by the find method and the CharPropsChange flag in the GetTextForRange method.
    3. Use a Boolean comparison between the idata of the text element to the angle of character and character constant weight.
    4. What that is the boolean is set to true, and then use the SetTextProp method to set the properties of the text range for the italic or bold character tag properties.

    This script works on the substitution of format first character found however it ignores other substitutions in the same paragraph. The cause of this is that the while loop updated the line of text control used by the find method for the following paragraph in the stream. I think I need to add an inner loop that runs through all the text in a single paragraph, where teaching iteration the loc text used by the find method is based on the same paragraph, but the offset is changed. I don't know how to do this.

    function removeOverrides (RPSC)

    {

    var vDocStart = pDoc.MainFlowInDoc.FirstTextFrameInFlow.FirstPgf;

    var vBoldFmt = getCharFmt (RPSC, "Bold")

    var vItalicFmt = getCharFmt (RPSC, 'Italic')

    initFA_errno ();

    While (FA_errno is constant .FE_Success)

    {

    var vTextLoc = new TextLoc(vDocStart,0);

    var vFindParams = findOverrideParams (CDRP);

    var vTextRange = pDoc.Find (vTextLoc, vFindParams);

    If (vTextRange.beg.obj.ObjectValid ())

    {

    var vTextItems = pDoc.GetTextForRange (vTextRange, Constants.FTI_CharPropsChange)

    If (vTextItems.length ==! 0)

    {

    If (vTextItems [0] .idata == constant .FTF_WEIGHT)

    {

    pDoc.SetTextProps (vTextRange, vBoldFmt.GetProps ())

    }

    If (vTextItems [0] .idata == constant .FTF_ANGLE)

    {

    pDoc.SetTextProps (vTextRange, vItalicFmt.GetProps ())

    }

    } else (Log (vLogFileName, ' \nERROR: none of the items were found in the table in text format but alternative size were found: ' + pDoc.Name))

    }

    vDocStart = vDocStart.NextPgfInFlow;

    }

    }

    function findOverrideParams (RPSC)

    {

    var vFindParams = AllocatePropVals (1);

    vFindParams [0].propIdent.num = Constants.FS_FindObject;

    vFindParams [0].propVal.valType = Constants.FT_Integer;

    vFindParams [0].propVal.ival = Constants.FV_FindCharacterFormatOverride;

    Return vFindParams;

    }

    Another approach (which is what I usually did) is after the first search to set vTextLoc = vTextRange.end

    Whatever it is, you might consider moving your initialization of vTextLoc and vFindParams outside the while loop. The settings do not change, why redefine them for each search?

  • How to use the utility disk first aid for hard drive internal el captian

    How to use the utility disk first aid for hard drive internal el captian

    Select the drive and click first aid.

    If something is not repairable because this is the system drive, then you need to start using the recovery partition and run disk utility it.

  • How to use the post method?

    Hello

    I need to send an image on the server using the post method.

    I connect using Http, like this:

    HttpConnection _http = (HttpConnection) Connector.open (address);

    can someone provide an example of how can I use a post method to send the data to the server?

    Kind regards

    I solved the problem. Here is my code, which works:

    Bitmap _bitmap = new Bitmap(Display.getWidth(), Display.getHeight());
                Display.screenshot(_bitmap);
    
    JPEGEncodedImage _jpg = JPEGEncodedImage.encode(_bitmap, 20);
    DataBuffer _db = new DataBuffer();
    _db.write(_jpg.getData());
    
    _http = (HttpConnection)                    Connector.open(_url, Connector.READ_WRITE);
    
    _http.setRequestMethod("POST");
    
    _http.openOutputStream().write(_db.toArray());
    _http.getResponseCode();
    

    Kind regards

  • How to use the find/search feature in a book?

    Hello

    New to indesign... working on a directory file that contains 25 chapters.

    I have definitive evidence to ensure that all double spaces are gone, all the quotes are right etc.

    Instead of opening of each chapter and by using ' Search/search' through each chapter, I can tell the "Search/search" function through the whole book?

    Appreciate any feedback

    Thanks heaps

    There is no special installation "book Search" in InDesign. You must open all the files that you want to search and then use the option "all the research papers" in the search engine. That and other gaps in the book led me to consolidate all the chapters of my book in a single file.

  • How to use the scrollInToView method in Adobe edge animate

    I would use scrollInToView method in one of my pages long, but I can't call this code, any help would be greatly appreciated.

    Hi, Krutneam.

    We can get the DOM element using jQuery () .get () method.

    If you want to scroll the window for pos of the "Rectangle" on the main timeline. Like this.

    sym.$('Rectangle').get(0).scrollIntoView();
    

    Thank you.

    UME.

  • Hey, how to use the files as in Firefox for Android?

    Hey all. Since the add-on of Ghostery for Firefox Beta for android (36) has not worked, I contacted Ghostery customer service, and they responded with a beta version of the Ghostery add-on to see if it would work. There is a file as... I was wondering, how can I use it in Firefox for android? To make use of this add-on? Thank you!

    Hi Ererer

    I have never installed an add-on third party directly to the Android operating system (only on the desktop). If you find the as in your folder Android downloads or via the Android file manager if it is in a different directory, try tapping on it and see if it will open in Firefox for Android and settle. Don't know if it will work because this cannot carry on Android and I do not see in our documentatino: https://support.mozilla.org/en-US/kb/find-and-install-add-ons-firefox-android

    Please let me know if the above works.

    See you soon!

    ... Roland

  • How to use the node function call library for a function in the dll with the data SUB type

    Hi all

    I would ask for your kind help

    I am facing a problem with the call library node.

    I have a C++ (stdcall) function, which has Sub as data type

    XXXX error code (hwnd, lid, getValue, * Sub data1, * Sub data2)

    data1 and data2 types are constantly changing based on the value of 'getValue '.

    Mainly I can use the call library node several times and adapt each node according to the types of data data1, data2 and extract the values and use in the code. Here is no question. Real question is:

    My question:

    How can I use a node of library time call and make a case according to the 'getvalue', who will control the data1, data2 data type. Here I really seeking solutions.

    My tests:

    I used varaints as entry to the libray call node of the data1, data2 and selected parameters in the call libraby node as "Adapt to type. Here labview just crashed.

    I appreciate your suggestions to feedbackand.

    Thank you

    Karine

    You must allocate enough space for data1 and data2, and then pass a pointer to this space. An easy way to do this is the function to initialize table. Set the U8 type and size for the number of bytes required. Pass this array to the function as a pointer of table data.

    After the function call returns, you need to extract the data in the table. You can do it manually, but a simple approach is to use the array of bytes to a string. Then, in a housing structure, use Unflatten chain to convert the string to the correct data type. This method also converts the "endianness" which will be probably necessary; Be sure to only set all entries for unflatten correctly.

  • How to use the parental control of security for the family by e-mail?

    Today I installed family safety via windows live essentials 2011 on my vista pc.  I can't find anywhere where it lists the ability to control the email.  When searching online, I see is very vague answers from people such as "just download family safety" and you can control the emails in this way.

    Can someone please give detailed instructions where in parameters and how to set up the control of the email, because I don't see it anywhere.

    If you are looking to set restrictions for a mail through family safety account. This feature is not currently available.

  • How to use the same mask, stencil, etc for several layers? Photoshop equivalent of the masked group?

    Hi I spent over half an hour for search manual, forums and the Internet and still can't find the answer. Help, please!

    For example, in a model with 5 or more layers, I want to use the same mask or stencil or what can hide layers 2,3 and 4 but areas layer 5 and all other possible layers below should not be affected.

    1. Before dialing the layers that you want to hide and apply a matte for the demo using the mask. Think to the Dial as an equivalent to the creation of a layer group.
    2. Use the effect on each layer you want to hide. It's easier to do if you apply mast set once and then create an animation preset to apply to the other layers. Just get mast set to do what you want it to do on the first layer, select Set Matte in ECW or in the timeline panel, and then go to the Animation > Save animation preset. Select then all other layers you want to apply the set matte to apply the preset.
    3. Put the mask at the bottom of the layers that you want to hide and turn on the switch to preserve transparency, then this group in composition with other layers of nesting.

    Here's another tip. You can set a custom color for all the layers you want to use the mast, then use the custom color for a group selection. This can make things easier down the line.

  • How to use the 2nd hard drive internal for storage?

    Hi, I am a newbie in all of this. I would use the 2nd internal hard drive of our mac mini server (end 2012) for storage (in fact, I'll things rsync from a remote server to here. but this is not the point here.). The thing is, I don't know how to access the 2nd internal hard drive and where to start. I did all of the following commands in the Terminal, but I don't really know what they mean, and what can I do with this information. I've been Googling but most are guides on how to install a 2nd hard drive etc. I hope that the information below is enough for someone to give me advice please?

    Thank you!

    That shows disk utility?

  • How to use the kit sensor Bioinstrumentation Vernier with NI ELVIS II and LABview on a CPU?

    So I have the NI ELVIS II + and a box full of Bioinstrumentation sensor, including Kit sensors: Analog Proto board connector (s), pressure sensor, hand dynamometer, hand grip monitor heart rate, EKG sensors, Surface temperature probe, among others.

    I can't seem to get all the sensor data to my PC that I use, I'm not too familiar with electrical circuits but I followed the manual directions for the specific sensor but it seems as if it doesn't have a difference. I'm with copper son crochet and so that they know the places appropriate (according to the manual) but nothing.

    Am I missing something? I have also the is open regardless of the specific LABview laboratory (Surface Temp lab for example), but when I press run it is as the sensors are not recognized or even be recognized. The sensors are plugged into the connectors on the analog Proto Board also. What I am doing wrong, and how can I get these sensors to work?

    Any help will be greatly appreciated.

    From what I see, it looks like a typing mistake in the manual.

    Try to connect GND AI0 - and NOT ALWAYS.

    It should look like this.

    Connect the following pins for wire connector:

    1. AI0 + SIG1 analog connector Proto Board

    2. + 5V power supply DC to 5V analog Proto card connector

    3. Power supply to the GROUND to GND of the analog Proto board connector

    4. AI0 - GND of the analog connector Proto Board

  • How to use the bottom of different color for the areas of text and form on a landing page?

    For our landing page, I like to keep white as the main background but color will have two text as well as a space for these three areas form box, I would use gray.  I got tired of using Fill Content but it will change the whole landing page background color and not only the text box.

    Someone knows how to do this?

    Thank you.

    Hi Angie, you use the WYSIWYG editor to create pages? If so, if I'm reading this right, you are looking to change the background color of the different page elements? You should be able to select each item and apply the color as below:

    I would like to know if this isn't what you are looking for.

    Best,

    Rob

  • How to use the catalyst to make application for phone

    can we learn how to use flash catalyst to apply for cell phone as black berries?

    N ° Fireworks does not have any code. You must use Flash Builder or Flash Professional CS5.

    There are some great introductory videos on tv.adobe.com, that can help you to understand what is complete required for the development of applications on the mobile platform.

  • How to use the same user interface project for different HumanTask in GR 11, 1 material BPM

    When I set a user interaction activity in my process of material Oracle BPM 11 GR 1 and associate a human task with it. It generates a new project to contain all my forms. Anyone know if it is possible to use the same project for the different human task?

    After generating the UI for your first human task project, you can click with the right button on the project in JDeveloper and select 'New', click on the tab "Technologies all", then "JSF'-> ' ADF task based on human task workflow of." Then find the file your BPMN/composite project .task.

Maybe you are looking for

  • iPhone NKQN2LL/A

    My 6 64 GB iPhone is model number NKQN2LL/a.  Which carrier is it intended?  I can't find any info on this model.

  • Any of you know how to search for hidden files? Thank you.

    I need to find a hidden file to delete and I can't find through the normal procedures.

  • HP Envy x 360 >: <------key functions such as a Ctrl key

    I recently bought a HP Envy x 360 and I discovered that the key on my keyboard to > <------acts as a Ctrl. How can I give this key the correct function? This key is located at the bottom of my keyboard between alt gr and the arrow to the left.

  • Error 0 x 80070091 directory is not empty fix does not

    I can't delete some files from my drive and I tried the solution listed here, that does not work http://answers.microsoft.com/en-us/windows/forum/windows_7-windows_programs/error-0x80070091-the-directory-is-not-empty-while/8c58e1d9-b6f2-4164-8fa6-19f

  • How can I create it?

    I'm trying to get the result of what I have outlined.The 2nd image under the sketch is my execution. For the first part of 'LOCUS' I did a proper job, I couldn't train the 'o' of the way I wanted (I was using the tool of a curvature.) and I can't con