Copy the selection to a string

Is there anyway to enter the selected text in a flowComposer and copy of a string for use in another control?
I spent in through all the api textlayout to the selectionmanager and editmanager and cant seem to find a way to do so, or to convert a TextScrap into a string... any clues anyone?

Is not too hard to do, but it is perhaps not completely obvious. You were directed in the right direction with the selection/EditManager. I think that the easiest would probably call createTextScrap() on selection/edit Manager, giving you a TextScrap object that has a public "textFlow" property that contains only the text box selected. Then you can move only the text stream to the exporter who will convert the flow of text in a simple string.

To get your string, you should do something like (didn't test this, but I think it should be close):
var scrap: TextScrap = editManager.createTextScrap ();
var selectedText:String = TextFilter.export (scrap.textFlow, TextFilter.PLAIN_TEXT_FORMAT, ConversionType.STRING_TYPE) as String;

It seems that it would be a good idea to incorporate a practical method of the SelectionManager class that performs this task for you, but I don't think that there is something like that right now.

I hope this helps!
-Brent

Tags: Adobe Open Source

Similar Questions

  • When I make a selection using the lasso and try to copy the selection, nothing is copied.  Why?

    I have PhotoShop CS6 for Mac, version 13.0.6.  When I make a selection using the lasso (or any other selection tool) and select 'Copy' and try to move the selection copied, nothing is copied.  What is going on?  I can't find an answer in my search for Abobe PS or the Web site, in general.

    If you still use the selection tools when you try to move the contents of a selection, it will simply move the selection. If you want to move the content, use the tool move (but be aware that the default action is to cut; use Opt (Alt on Windows) to copy the selection by dragging).

  • Acrobat 9 Pro: cannot copy the selected text unless I have a highlighting of the text

    I highlighted the text in a document. When I go to copy this text, it selects the whole sentence. I right click, the menu starts with "set status. There is no option "copy". No control-C is successful. When I paste then, he pastes a previously selected text, not the text I'm trying to copy in Acrobat. The only way I found to copy the selected text to the United Nations is a development and then copy it. Are there other solutions?

    Thank you!

    Play with the Shift key... you will get it.

  • CS6: create a simple extension: how to copy the selected text in the extension?

    Hello

    with this tutorial http://www.DWfaq.com/Tutorials/Extensions/simple_object.asp

    I created a very simple extensions in Dreamweaver CS6.

    But I can't find out how to get the code/selected text "in" this extension.

    I want to reformat the selection with the javascript code for the extension and replace the selected text.

    Thank you!

    mtemp

    Thank you very much for your answer!

    I didn't know the difference between these two methods - my google search for 'extension' led me directly to the old tutorial mentioned...

    And, Yes, I had to search long enough to find the 'object' extension on the fly on the menu...

    Now, I adapted the code referred to in the dreamweaver_cs5_extending.pdf for the creation of such an extension of command - and, wow, it works... with 'copy' the text selected in the extension form.

    So, thanks again! Now I'm on the right track

  • Copy the selection to the same position in all frames roto

    I use AE CS5 in Production Premium. I also moca AE 3.1 which is perhaps a better way to try to isolate an object using planar tracking.  I need to replace an item that appears in the same position on all frames of a clip.  He is a previous problem I've covered long involving a spiders Web that has been set on a 8mm film door.  Thus, the web appears in the upper left corner of each image in the clip.  Perhaps a different approach will work.  It is complicated because the background of the element changes such as the limits of the selected item are dimmed.  I need to further isolate sections of the clip where there are similar background interference, for example a background of mostly from the dark trees in the left upper part may be passable.  There may be a way that I can gradually replace the web with the background that appears in the following images as the background moves using duplicate layers.

    How I can roto select this item in the first image and copy the limits of selection to all executives or is there a better way to do this?

    How I can roto select this item in the first image and copy the limits of selection to all executives or is there a better way to do this?

    You do not have. You think on bad terms here and work yourself to death if you follow this approach. Instead, export an image, isolate the model clean grey scale as an image in Photoshop. Then you can either use it as cache to perforate disturbances directly or by creating adequate transparency, possibly in a publication before using it as a pole of luma on a white solid, like an entry for one adjustment layer. Then, you can eitehr just fill in the blanks with a copy of your pictures that you have slightly shifted in position or in the second case, apply effects such as Minimax, dilated-eroded repetitive and varius scrambles to fill gaps. CC vector Gaussian with the transparency as input channel will do miracles "sew" these things together. Of course, you can also consider RevisionFX' RE: fill out as kind of a plugin tool in canned and pimp for these kinds of things...

    Mylenium

  • I want to copy the selected pages of a PDF file in a new PDF file

    I have the trial version free adobe DC

    I have the following instructions:

    Open the PDF that you want to extract and combine files

    Click CREATE

    Choose - to combine files into a single PDF

    In the upper left corner, click on: Add files, and choose Add open files

    You get a sound box with all open PDF files, choose the one you want to work with, click it and then click Add files

    You are on the main box to combine files.  IN the upper right corner to choose - only PDF file

    On the background, click Select the Pages

    Now click on Pages:, and then in the box empty, type the pages you want extracted.  Example: 5-21, 48-58, 76, 77

    Click on 'Ok '.

    Now, on the bottom right, click on - "combine files".

    You will get a binder with the selected pages.

    However, I don't see a box to type in the pages I need.

    Have I not the right version of Adobe?

    Extract pages:

    Tools > organize Pages > excerpt

  • Copy the selection into a new document

    Here's a breakdown of what I am wanting to do... any guidance would be appreciated!

    1. the user will select the elements (blocks of text, items, transparent path)

    2. the user will execute a script that will do the following...

    1. open a new document (8.5 "x 11") with RGB color

    2. anything with a color fill should get gray 100% fill applied

    3. anything with an outline of color should get 100% of applied gray race

    4. then save a .ai file and a PDF in the following format...

    #target illustrator
    
    
    var doc = app.activeDocument;
    var fileName = doc.name;
    var jobName = (fileName).substr(0, 11);
    aiFile = "D:\\Jobs\\"+jobName+"\\AI\\Cover Page.ai"  
    pdfFile = "D:\\Jobs\\"+jobName+"\\PDF\\Cover Page.pdf"  
    
    
    var newaiFile = new File(aiFile);  
    doc.saveAs (newaiFile);  
      
    var pdfOpts = new PDFSaveOptions();      
    pdfOpts.pDFXStandard=PDFXStandard.PDFXNONE;  
    pdfOpts.compatibility = PDFCompatibility.ACROBAT5;      
    pdfOpts.preserveEditability = false;  
    var newpdfFile = new File(pdfFile);      
    doc.saveAs(newpdfFile, pdfOpts);
    
    
    
    
    
    
    

    OK, so I got it away square to where the art jury moves selected items. Someone else wrote the code to move the jury art to the selected items, and I modified to fit my needs. So that being said, a big thank you to pixxxel schubser to get the code for the part (found here... ( https://forums.adobe.com/thread/1336506 )

    Here is the code for anyone to see/modify/use!

    #target illustrator
    
    var newDocSet = new DocumentPreset;
    newDocSet.title = "Cover"
    newDocSet.width = (8.5 * 72);
    newDocSet.height = (11 * 72);
    newDocSet.units = RulerUnits.Inches;
    newDocSet.colorMode = DocumentColorSpace.RGB;
    
    var doc = app.activeDocument;
    var selectedItems = doc.selection;
    
    if (selectedItems.length > 0) {
        var newDoc = app.documents.addDocument(DocumentColorSpace.RGB, newDocSet);
        for (var i = 0; i < selectedItems.length; i++) {
            var newArt = selectedItems[i].duplicate(newDoc, ElementPlacement.INSIDE);
        }
    } else {
        alert("nothing selected");
    }
    
    // to move the new document artboard over to the selected items
    var doc = app.activeDocument;
    var selectedItems = doc.selection;
    
        var abIdx = doc.artboards.getActiveArtboardIndex();
        var actAbBds = doc.artboards[abIdx].artboardRect;  
    
        var vBounds = selectedItems[0].visibleBounds;
        vBounds_Li = vBounds[0];
        vBounds_Ob = vBounds[1];
        vBounds_Re = vBounds[2];
        vBounds_Un = vBounds[3];  
    
    if (selectedItems.length >1 ) {
        for (i=1; i vBdsI[0] ) {vBounds_Li = vBdsI[0]};
            if( vBounds_Ob < vBdsI[1] ) {vBounds_Ob = vBdsI[1]};
            if( vBounds_Re < vBdsI[2] ) {vBounds_Re = vBdsI[2]};
            if( vBounds_Un > vBdsI[3] ) {vBounds_Un = vBdsI[3]};
            }  
    
        doc.artboards[abIdx].artboardRect = [vBounds_Li +((vBounds_Re - vBounds_Li)/2-(actAbBds[2]-actAbBds[0])/2), vBounds_Ob -((vBounds_Ob - vBounds_Un)/2+(actAbBds[3]-actAbBds[1])/2), vBounds_Li +((vBounds_Re - vBounds_Li)/2-(actAbBds[2]-actAbBds[0])/2)+(actAbBds[2]-actAbBds[0]), vBounds_Ob -((vBounds_Ob - vBounds_Un)/2+(actAbBds[3]-actAbBds[1])/2)+(actAbBds[3]-actAbBds[1])];
        } 
    
    // save .ai and .pdf file to correct locations, then close the file
    var allDocs = app.documents;
    
    for(var i = 0; i < allDocs.length; i++){
    var fileName = allDocs[1].name;
    var jobName = (fileName).substr(0, 11);
    aiFile = "D:\\Job Number\\"+jobName+"\\AI\\Cover.ai"
    pdfFile = "D:\\Job Number\\"+jobName+"\\PDF\\Cover.pdf"  
    
    var newaiFile = new File(aiFile);
    var doc = app.activeDocument;
    doc.saveAs (newaiFile);
    saveAI();
    
    var pdfOpts = new PDFSaveOptions();
    pdfOpts.pDFXStandard=PDFXStandard.PDFXNONE;
    pdfOpts.compatibility = PDFCompatibility.ACROBAT5;
    pdfOpts.preserveEditability = false;
    var newpdfFile = new File(pdfFile);
    doc.saveAs(newpdfFile, pdfOpts);
    }
    
    function saveAI( path, name, id ) {
      var saveOpts = new PDFSaveOptions();
      saveOpts.compatibility = PDFCompatibility.ACROBAT6;
    }
    doc.close(SaveOptions.SAVECHANGES);
    
  • copy the select value in the textfield of LOV, and allow the user to modify

    Hello
    I have a datablock with 20 records and each record has a comment (say field_comments) fields. I would like to allow the user to choose LOV populated predefined comments (say lov_comments) and add a few additional comments after they choose the value of LOV.

    I created a LOV and added the return type 'field_comments' in column mapping properties. When the user clicks a button, LOV opens. They choose the value of the LOV and the value goes to the field 'field_comment '. The problem with this approach, the user cannot add their comments after selecting in LOV.

    I tried this too much. I created another area of non-visible text (i.e. fake). In the LOV, I added "dummy" field as returntype. In the dummy field, I created the trigger 'After the CHANGE', which basically says: block. field_comments =: block. Mannequin.

    But, the user must click another field to display the value selected from the LOV. The values of the 'field_comments' is not being updated as soon as the user click on the 'OK' button in the LOV.

    I'd appreciate if someone could give me feedback and help to solve my problem. Thank you for your help.

    I thank.

    Well, I tried exactly what you posted and it allowed me to SELECT from LOV, then CHANGE/ADD new text in front of returned value in the field. He recorded in the database and questioned without any problem.

    Your article is allowed to INSERT/update? If this isn't the case, then set yes "Update/Insert allowed" and attach your LOV to the element and set "post to list" No.

    You can also see if you have any validation done on WHEN-VALIDATE-ITEM trigger or after CHANGE which will fail because you change LOV populated values.

    I hope that helps!

  • How to copy a selection without moving the entire image?

    Once I selected a part of an image, I try to use the move (with the ALT key) tool to copy the selection into another image.  But the movements of the whole picture and not only the selection.  What I am doing wrong?

    In fact, I found this one - move the selection into a new layer, then copy.

  • Skype for Symbian: cannot copy the text!

    Hi, I use Skype for my Nokia E52 and I can select text on the IM window by holding the SHIFT key with the help of the arrow buttons (navi). The problem is that I couldn't find a combination of path/button to copy the selected text in the Clipboard.

    How can I reach it? I appreciate the response.

    No help?

  • prohibition to copy the part or parts of the PDF document

    Can I disable (via scripts) a copy of a particular area of a PDF document? For example, a person copy the selected text in the document (Ctrl + c or via context menu), but in the memory buffer in fact will be added only allowed to copy text (for example, a paragraph is prohibited and the other allowed).

    No, it is not possible. You can apply a security policy that prevents the copy of the entire file, but not part of it.

  • Move the selection form, not the content, to another layer

    I understand that after the creation of any selection, CTRL-J copy the selection into a new layer, but this isn't what I want to do.

    I want to copy just the selection form (i.e. its contour), not its content, so that I can then apply this form of selection to any other existing layer.

    The goal is to take a selected layer A shape, apply the shape in layer B, remove the box around the selection into a layer B, and end up with a form in the B layer that contains the content of layer B pixels, no layer.

    I have Photoshop version 9, CS2. I tried to study masks, but were not able to find a basic explanation of beginner of masks

    Nice day!

    You can store a selection as an Alpha channel and then load it as often as you wish.

    Also you can use layer masks, those who can the duplicated on other layers (and if necessary reversed) easily.

    I want to copy just the selection form (i.e. its contour), not its content, so that I can then apply this form of selection to any other existing layer.

    It doesn't seem wise, an active selection is a property of the file and not a layer.

    The goal is to take a selected layer A shape, apply the shape in layer B, remove the box around the selection into a layer B, and end up with a form in the B layer that contains the content of layer B pixels, no layer.

    If the selection is anti-aliased or soft that risk unnecessary fringes.

    Could you please post a screenshot with the Panel visible layers to clarify your intention?

    Kind regards

    Pfaffenbichler

  • Copy the /Paste procedure

    Is there anyone who can help me with how to copy and paste my sql commands at the command line? I tried to do it for two weeks now and have failed! I would like to copy a text in the command line editor. When I try to do my command line returns this!     (^V). Help, please. Thank you, expertise23

    >
    I would like to copy a text in the command line editor
    >
    Right-click Windows in sql * over the window and select "Paste".

    To select text in the sql * over the window with the right mouse button in the sql * over the window and select "mark". Then move the slider until the beginning of what you want to copy, hold down the left button of the mouse button and drag the mouse to highlight the section you want to copy to the Clipboard.

    When you have the section highlighted, right click on the top left corner of the command window and select "edit - copy" in the menu to copy the selected area in the Clipboard.

  • How to get the 'selected text '? leave a string

    If I highlight text in a text string, I want to be able to copy it to the Clipboard.

    I have already created an event that uses the Application of reference to 'write the Clipboard' now I need to give it the selected text.

    How do I do that?

    Here's a way to do it.

    Ben64

  • Is there an easy way to copy the content of each message into a folder in a text file (without visiting each email, select, copy paste)?

    I need to scratch the data of a few 1000 + email. How can I believe more easily the content of these emails and either push in text files, or treat them with a script?

    Thank you

    Install ImportExportTools:

    https://addons.Mozilla.org/en-us/Thunderbird/addon/ImportExportTools/

    http://chrisramsden.vfast.co.UK/3_How_to_install_Add-ons_in_Thunderbird.html

    Copy the messages in a folder, select the folder, tools/ImportExportTools/export all of the messages in the text file / in the single folder.

Maybe you are looking for

  • iPhone not recognized in iTunes 12.1.3.6

    I have iTunes 12.1.3.6 installed on a laptop running Windows Vista and cannot get my iPhoneSE with ios 9.3.4 to be recognized for the synchronization or backup.  The diagnosis indicated that I need a newer version of itunes but when I go to get an up

  • Why can't send pictures of my iphone SE to an android device

    I take a picture with my self.I want this text to my brother who is an android phone. He comes back, almost immediately "not delivered".sending photos to other iPhones works very well. I have wifi connections and the internet

  • Qosmio G50 - problem with graphics card or fan problem?

    Over the last year, I bought myself a Qosmio G50 at the beginning it seemed very nice and kool or so I thought until after the expiration of the first year, I noticed a small problem with my laptop. 1. my fans are loud and sometimes they overheat, wh

  • Satellite P series - I can scroll no longer using edge of the touch pad

    Please can someone tell me why I can't no more long scrolling using the edge of the touch pad.This seems to have taken place since I had to reinstall Vista due to a problem with low defective Ram. Thank you

  • Split HP 13 x 2 peut-she take a wired Internet connection?

    This laptop can maintain a wired connection? router--> cable ethernet--> Tek Republic TUN - 300--> portable USB 3.0 port It seems that this laptop has no LAN or even support a wired connection. Can someone please? Thank you