Editing existing text layer...

Hello

I am running CS4 on Vista 64-bit and a PS script in Javascript programming...

I struggle to change an existing layer in a file .psd I open.

The script is quite simple:

1. open the .psd file

2 change the alignment of the content, size, font of the EXISTING text layer

-> Note: this text EXISTING layer has an applied existing LAYER STYLE

3. close the file

Everything works well except the part 2. The reason why I change this EXISTING text layer is, b/c it is already exactly positioned where it should do and the desired layer style is already applied...

Here is what I tried:

I. I thought given that the layer is already a LAYER of TEXT it is not necessary to set the TEXT properties once again - I used this code:

textLayer var docRef.layers = ['text layer ']; define the text existing in a VAR layer
docRef.activeLayer = textLayer;

textLayer.font = "regular"; _Aviano
textLayer.size = 36;
textLayer.style = "Regular";
textLayer.antiAliasMethod = AntiAlias.SHARP;
textLayer.contents = "test change."

-> Problem: the script runs without error, but the changes are NOT applied.

II. I defined the existing text layer to be a LAYER of TEXT - I used this code:

textLayer var docRef.layers = ['text layer ']; define the text existing in a VAR layer
docRef.activeLayer = textLayer;
textLayer.kind = LayerKind.TEXT;
var T1 = textLayer.textItem;
T1.font = "regular"; _Aviano
T1. Size = 36;
T1.style = "Regular";
T1.antiAliasMethod = AntiAlias.SHARP;
T1.contents = "test change."

-> Problem: this concerns the changes, BUT the actual text font size applied is 120 (!) - I have to multiply by 0.3 to actually get to 36 and this does not work all the time... very, very strange... I guess it has to do with the fact that redefine us a layer of EXISTING text as a text element...

III. I have of course...:

1. create a NEW text layer
2. apply all my properties

3. then place it at the exact location where the EXISTING text layer

Problem: creation and styles (properties) work fine, BUT when I get the coordinates through .bounds and when I apply the [0] and [1] values it does NOT match the position (too high)... applying the [0] and [3] values does NOT either (too low) mtach... I have to split the difference between these two?

Thanks for your help in advance!

M

The reason text has not changed in your first example is that you set the font, size, etc to the layer not the textItem prperties. You fixed that in the example following you.

When you work with pixels, you must assign the baseUnit if the doc is not 72 dpi. Something like that

UnitValue.baseUnit = UnitValue ((1/docRef.resolution),'in');// the default value is 1/72
textLayer var docRef.layers = ['text layer ']; define the text existing in a VAR layer
docRef.activeLayer = textLayer;
var T1 = textLayer.textItem;
T1.font = "regular"; _Aviano
T1. Size = UnitValue (36, 'px');
T1.style = "Regular";
T1.antiAliasMethod = AntiAlias.SHARP;
T1.contents = "test change."

The size is now 36 pixels. If you do not want to change the baseUnit you can change the resolution as proposed by Xbytor.

Also if you want to match the position of a text layer, use the property textItem.position instead of the boundaries of the layer.

Tags: Photoshop

Similar Questions

  • Why Photoshop 6 creates a new layer of text whenever I want to edit an existing text layer?

    Why Photoshop 6 creates a new layer of text whenever I want to edit an existing text layer?

    You can choose the text tool in an effort to make a montage.

    Instead, double click on the T in the text layer.

  • Modification of the text in an existing text layer.

    PES 9 under Mac Snow Leopard running.

    I have a picture of family consisting of several layers of text.  I am trying to edit the text in a layer selected large multiline text.  I'm following the steps in the appropriate article of PSE help, but I always end up creating a new layer and no-go/go red/green option.    I thought that I should just be able to double-click on the text layer and start editing.

    Family w-comments.jpg

    Select the text tool. Single- click in the text where you want to start editing. You can also click and drag to select some of the text, and then type in the new, replacing the selection.

    Note: Editing the text does not work if she has been simplified.

  • In trying to edit my text layer, it creates a new layer. Help please: >

    Yes, as the subject of bed. I can't change my text layer. If I try to use the tool t it doesn't create a new layer. IM displaying a screen so that you can see that I don't have a T-layer.

    These are the characters. IM pretty noob on photoshop. So, you might go through the base of guidance on how to do it.

    However, I tried the t layer doubleclicking. There is no highlight on the text, nothing happens.

    Screen shot 2013-07-19 at 14.27.53.png

    All you can do is remove this layer and re-do with the text tool. There is no way to reverse this trend.

    Always keep a copy of your psd file unrasterized before you rasterize the text.

  • In editing in the browser can create you new text boxes and images or can you only replace pre-existing text/images?

    Editing in the browser can you create new areas of text and images in your muse site? Or can you only replace pre-existing text/images?

    You can only replace the existing content, do not change the structure of the page. See the respective help sections.

    Mylenium

  • PE 9-cannot change text-keep existing add new text layer

    Hello

    I'm trying to re - edit text in a .psd file.  I tried:

    • Select the layer on the text
    • Select the text tool

    According to all forum messages/help videos I watched, I thought I was supposed to be able to change the text this elsewhere, but all that happens is that it allows me to add a new text layer.  I'm sorry if the answer to that has already been posted, but I could not find.  I appreciate all help.

    Lori

    I think that I finally thought to it! The layer has been simplified, because there is no "T" in the text icon in the layers panel.  I don't remember to simplify, but somehow I must have.  I tried to create a new text box, and of course, even after it hit the green check mark to accept all of the settings I've chosen initially, I could go back and change it.  A disappointment, because now I need to go back and understand exactly how I had it before, but at least the mystery is solved.  Thanks for the suggestions.

  • How to change the existing text of a model?

    Hello everyone, Im new to photoshop and I check a lot of things here and there, just wondering how to edit a text from an existing template? I downloaded a model and Im pressing the tool t then Im clicking the text I want to change but he used to Exchange and only adds a new layer of text? Help!

    You click the box bad you clicked outside the T text icon in the box that opens the layer style dialog.  Try to click the T icon in the text to change layer which is found in the layer in the layers palette.

  • Make the text layer transparent logo

    Hello

    I want to create a logo with the text layer and the background transparent (so that both are found with the gray and white square)

    I have it done before, but when I now create the circle logo, create the text, then use magic want to select the text you want to delete and make them transparent, he said: I can't edit without pixelation of the image.

    Once I did I use the magic wand to try to make it transparent, it removes the text and watch only the circle.

    Can someone give me a step by step guide?

    The attached picture is the effect I want to create with transparent lettering.

    Thank you in advance!

    Rphotoshop_problem.png

    You get the error because you are trying to remove pixels from your text layer.

    When you have the choice of characters, activate the layer with the circle, then click on remove. (Hide your text layer when finished)

    BTW better (than the magic wand) to select the text is in control, click on the thumbnail for the text layer.

  • You cannot change the text layer

    I am trying to change a word in a layer, but whenever I click on this word a new layer comes and I can't access the text in the layer I want.  What I am doing wrong?

    According to the guidelines of the screenshot you provided, it seems the text layer was rasterized or flattened, you can't get back to edit mode.

    ~ UL

  • Place a PSD in Muse with editable/HTML text?

    Hi there, good people of the Museosphere,

    I created my Web design in Photoshop. I placed my PSD with layers in Muse, who makes all my text in graphic text.

    I would like to know if there is a way to place a file in Photoshop to Muse so that my text is in HTML format, or editable text.

    I would be really grateful for all solutions with a widget/script that I use either with workflow.

    Essentially just want to send my design to my html + css + js developers.

    Thank you!

    Ana Maria

    When you use the feature extraction on a Photoshop file online (just see the creative cloud file in a browser), you can copy the properties CSS , as long as the text itself. Just look for the text layer on the right, but hover above the layer itself (not right). You can see additional information available and actions arise. Never mind, that these features are not so obvious or redundant available in the Panel layers on the right.

  • worksheet for text layer script?

    Does anyone know of a script that will create a new photoshop file, copy a line of text, spreadsheet, csv or text delimited an another doc, paste in a text layer, save and close, going on to the next line of text and repeat until the end?

    Excuse my bad English. You create in the folder where your script is a text file in which there are 4 lines. For example:

    Line 1

    Line 2

    Line 3

    Line 4

    The following script reads each line, creates a new doc, add a text layer above the background, written inside the content of the line and saves the document (psd format) in the folder where the script.

    MAC Finder or WINDOWS Explorer

    #target photoshop

    app.bringToFront ();

    main();

    main() function

    {

    currentPath = (new File($.fileName)) .path var + ' / ';.

    var fileTextName = currentPath + "lines.txt";

    var = read_file File (fileTextName);

    var line = "";

    var artLayerRef ="";

    var psd_Options ="";

    var newFile ="";

    Opens the text file lines.txt that exist in the scripts folder

    read_file. Open ('r');

    while(!read_file.) EOF)

    {

    Line = read_file. Readln();

    Create a new Photoshop document

    App.Documents.Add ();

    newFile = app.activeDocument;

    Creates a new layer of text art

    artLayerRef = newFile.artLayers.add ();

    artLayerRef.kind = LayerKind.TEXT;

    artLayerRef.textItem.contents = line;

    Saves the PSD options

    psd_Options = new PhotoshopSaveOptions(); [PhotoshopSaveOptions]

    psd_Options.layers = true; retains the layers

    psd_Options.embedColorProfile = true; Profile of canned

    psd_Options.annotations = true; preserves the notes

    psd_Options.alphaChannels = true; preserve alpha channels

    psd_Options.spotColors = true; preserves the inks

    Save the new document

    newFile.saveAs (file (currentPath + ' /' + line + ".psd"), psd_Options, true);

    newFile.close (SaveOptions.DONOTSAVECHANGES);

    }

    read_file. Close();

    }

  • "ESC" on the text layer is removal of text like old Photoshop

    I have got so accustomed to the use of the ESC key to go back to the pointer tool once I've finished writing a text layer, I can't not do that without losing the text I've written since the update to Photoshop CC 2015.

    No idea why they changed it, but editing preferences-> Type of-> and check the box to use ESC to validate the text

  • How to wrap an existing text box around an object?

    I installed the columns plugin for Photoshop CC 2014 and it does what I want it to do, however, every time I "columnise" my existing text box, which is wrapped up another image using paths to work (it comes to the video I looked to create the package), the plugin removes the work path connected as if it were a new fresh text box , I created, remove the packaging.

    I was wondering if there was a way to wrap text around an image/object, preferably after I put it in columns existing .

    Thank you.

    Ok. I installed the extension (I love the way that the extensions install using the Application Desktop Manager now) and it works well, but as you say, it does not account for the retention of the text shape/path and makes a new text box.  This text box is not based on a path, so you cannot modify it.  So low line here is Uber columns won't do what you want.  You could always email Anton ([email protected]) to get a definitive answer.

    But it's frankly hard to manually change your shape.  Well actually it's a little bit tedious, but not rocket science.

    1. Make your shape.  An easy way to do it would be to make as a selection, and then click Make route selection work icon at the bottom of the Trace Panel.  Drag the resulting path on the icon new way to save it.
    2. Now drag two guides to mark the gap between columns.
    3. Zoom way to the top of your path where guides cross it.
    4. Select your pen tool and place the cursor on the intersection of the road and one of the guides.  You will see a little + when you do this, add a point.
    5. Do the same thing to the other guide intersect, then add a third point between them.
    6. Press the delete key.  You now have a gap in the path.
    7. Down to the bottom of the track work and repeat.
    8. With the selected pen tool hover over one of the end point, and then click.  (You should see a little icon of string that indicates you are at the right place.)  I don't see that for some reason, but it still works.
    9. Now, hover over the end point above or below.  When you see the tiny icon (), close the path.
    10. Repeat for the other side.

    Not quite there yet.  You make the way to work in a form.

    • Go layer > new fill layer > solid color chose to any color. You disable this layer when finished.
    • Select the text tool and place the cursor within the form.  The pointer changes to a vertical bar with dotted circle. Click and paste the text.
    • You can store the text in Notepad or in a text box.  It does not matter.
    • It will not automatically be extended to the next column.  You will need to do it manually.

    Ahh... Just remembered.  When you close the original form in two distinct forms, the corners will likely swell.  Hold the Ctrl key to select the point angle, then Alt to drag the handle down, the low point.

    So there you have it.  Or just use InDesign, or even [spit] MS Publisher.

  • Is it possible to save the text layer only to add several PDF?

    I create one editable sheet of labels.

    Once, I create all the text boxes and placed correctly, I wish I could add this text layer for the other sheets of labels with the same layout... without having to start from scratch.  Is this possible?

    Hope that someone knows the secret

    You can use the function of replacement pages.

  • Text layer and image in text

    Dear community of PS elements!

    I have a burning question:

    How to create an image to appear in the text?

    Finally, I would like the poster to be in a color filled with just the image that appears in the text.

    I've already found a few useful tutorials like this one: http://graphicssoft.about.com/od/pselements/ss/imageintext_3.htm
    But the problem seems to be that program in my case does NOT create a text layer when I start working with text, as you can see in this picture (there is text but no LAYER?)Screen Shot 2014-07-08 at 4.23.05 PM.png

    I'm really a beginner - so sorry if this is something ridiculously obvious, but after a few hours of Googling for answers I really hope to find them here

    Thank you!

    Text layer and image in text

    You use the tool hides text, not the ordinary text tool. The type mask does not text; He makes a selection in the form of text. Try to create your text with the regular type tool (tool in the box change options tools), then reduce the opacity if you want solid text. If you mean you want to outline the text, then the beginning where you are now (with the selection in the form of text) and go in Edition > stroke (outline) selection and see if it's what you want.

Maybe you are looking for

  • Replace different values in different cells

    Hello I'm new to LabVIEW and work with a tool that retrieves its settings in an Excel file. I need to change these settings in Excel using LabVIEW. The Excel file is formatted as .xls (97-2003 version). The PC has Microsoft Office installed 2013. I'm

  • Oxc0190036 3724/94978 (dfarprov.mfl) error code

    The automatic update on my laptop has suggested that I update to Service Pack 2, so I agreed.  Of course, to install the computer must shut down and restart.  When the computer restarts, it goes through the installation until where it displays this c

  • Some of the e-mails, I received and saved in Outlook Express 6.0, disappeared. How can I get it back, and what caused it?

    There are records at random in my Outllook Express that the mail that I rescued disappeared. There was no breakdown nor any other icident happened. Outlook Express request the compress for additional space, several times a day. Can you tell me how to

  • Drive problem audio unistall...!

    Hello I have a problem in my audio devicefirst of all I don't know my name of the motherboard or audio card typesoI tried many software but none worked and I got this http://img249.imageshack.us/img249/9237/67491588.jpg When I try to uninstall until

  • TROUBLESHOOT MY MOUSE

    My mouse pointer is not lining up properly. I installed all available updates for my computer, but the problem persists. The mouse is not click where it belongs. I insist on a tab on any page and when I click on my mouse it access the tab next to wha