AppleScript cannot change the font of the text layer

I used Applescript to create a text layer and specify its properties, but when I specify the font I get a compilation error:

Impossible to define 'class NTR' to 'TradeGothic-Bold ". Unauthorized access.

That sounds like a kind of permission error.

Here is a little simplified script:

Tell application "Adobe Photoshop CS4"

say current document

do new layer of art Properties {name: "File name", type:text layer}

say the text object layer of art 1

the value {content, size, stroke color, position, type} {"thefilename", 12, {class:RGB hexadecimal color, hexadecimal value: 'CC0000'}, {2, 12}, text of paragraph}

set the font to "TradeGothic-"BOLD""

tell the end

tell the end

tell the end

If I put the police manually and use 'get properties of the text object in layer art 1', the Script Editor returns (with a long list of other properties):

"" police: 'TradeGothic-"BOLD".

so I think that I've specified the name of the font correctly at least. In the list of properties returned by the Script Editor, the font is blue like above, but all other property names are purple. It's I have to say something.

Well, after some trial and error, I answered my own question. Here's what worked:

Tell application "Adobe Photoshop CS4"

tell the active document

new layer art with properties {name: "File Name", layer type: text}

the text of the layer 1 of the art of storytelling

the value {content, size, stroke color, position, type} {"thefilename", 12, {class hex color: RGB, hex value: 'CC0000'}, {2, 12}, paragraph text}

tell the end

set the font for the text of art layer 1 to "TradeGothic-"Bold"object

tell the end

tell the end

Maybe someone who understands OOP and/or better than I do, may explain why it worked and my first try didn't.

Tags: Photoshop

Similar Questions

  • 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

  • Cannot change the text box.

    Adobe Acrobat DC recently auto updated to the latest version, and it seems that the new version does not change the text boxes.

    The screenshot below shows what I mean.  I added a text box and pointed the police to change the size / font style / color, but it is gray just to go out in the toolbar properties (Ctrl + E)

    ADOBE CANNOT EDIT TEXT BOX.JPG

    Has anyone experience this problem?

    Hello

    We have released an update today which solves the problem of the properties toolbar and now you can continue to use it outside of the app commenting as well. Please open Acrobat or Reader DC and visit help > check for updates to ensure that you are on the latest patch.

    Details on the release: https://helpx.adobe.com/acrobat/release-note/acrobat-dc-august-02-2016.html

    Please let us know how it goes.

    Thank you

    -ashu

  • In the edition browser cannot change the text most

    I can't change the text of most. There are a few areas that can be changed, such as the text that is linked and images (with the exception of images of text). But the basic text not! The site is www.abientotandkidspot.com.

    You use a system font for some text, the entire text exported as an image block. If a block of text uses only web-safe fonts or present web fonts natively in Muse, it should be editable (except some other condition in the documentation link above applies).

    Abhishek

  • Cannot change the text in the existing mathscript box

    I'm under Labview 8.2... I know it's super old, but I met some compatibility issues and found it much easier to continue in version 8.2.

    In my while loop I a mathscript box that controls which cases need to be chosen for each loop.  This configuration has worked perfectly in the past, but now when I try to change the text in the box of mathscript (blue box) I can not type anything in the box.  I click the mathscript box and selects just as if I want to move around.

    Anyone know what could be the cause of the problem?

    Thank you!

    You don't want the arrow tool. You want the tool to operate. One that looks like a helping hand.

    Have you checked that you have enabled editing that made a license for MathScript? Check your License Manager.

  • cannot change the text field after grouping

    Hi people,

    I have 3 single-line text fields and a logo combined using 'Add parents '.  For some odd reason, I can't select a field to edit text.  I can select them in the assets Panel and change the layout or style, but as soon as I double-click to edit the text, my selection goes to the div parent instead of the text field.  I tried to use the text as well, but it always happening in selection to the parent.  This isn't a big deal since I can change the text later in a Publisher, but it's a little frustrating.

    FWIW, I ran the update of this morning before starting, but I doubt that caused this nothing thanks for any help

    -Kevin

    So sorry Chris, in my frustration, I removed the parent and the group so I can get the item that I wanted to edit, and then recreated the parent.

    However, your description of the differences between the Group and Add Parent in this discussion: http://forums.adobe.com/thread/1361983?tstart=0 probably explains why I have problems.  I think I had GROUPED fields 3 text and then wrapped in this group and the image of the logo in another div with 'Add parents '.  I have probably not been not clicking successfully through the parent company to the group, and then in the text field.  In fact, I was clicking like mad, but probably not on the correct spot for each level.

    Thank you to specify how these elements work.

    -Kevin

  • Cannot change the text and no answer here fits

    I'm trying to change the text in a doc, I created long ago in ID CS6. I can't access it to change. The layer is not locked, and the text is not on a master page. I can access text on some pages, but not others, and I can't understand the difference.

    Here are the words of one thousand dollars:

  • You cannot change the text on the models of Stock from Adobe

    I downloaded a graph (AdobeStock_117354228 & AdobeStock_117354263) and I am unable to edit the text. Specifically, it seems that there is too much anchor and points objects able to edit this file.

    Am I missing something here or these files are supposed to be difficult to change.

    I browsed this forum support and only found a post related to this topic.

    Poorly created vector files.

    Abdul Qaiyoom

    Text in .ai files are converted into marks if they use a non system font. If the image uses a font that is not on a computer by default may not be included in an editable file because the author has failed to provide to the police. The only way to change in all the classes like this is to open the image in PS and use the recognition of police tool to find the font used or one close to it. Then, delete the text in the image and add your own. It is a question of law with the licensing of fonts that requires to do this way.

  • Cannot change the text in the menu

    Untitled.png

    I downloaded a template I'm trying to edit the text in the menu and despite everything I try, I can't seem to change. I'm sure it's something simple, but I'm stuck. any help would be appreciated.

    Thank you

    Stephen

    If the menu is not a menu manual, it takes the name of the site. This means: go to the plan view and change the name of the site, or to use a name that you like right on the page icon, choose 'Page properties' and use another name.

  • Cannot change the text style in the first 12 items

    In the first 12 items, it seems as if when I add a title and text and you want to change the style of it, which there are many choices, I can do it once or twice, but if I want to do with multiple texts, it does not work. After changing the style of some text once, or maybe two, it does not work yet. The text does not change when I click or double click on the style that I want to use. I have to close the software for each text and then reopen my project to be able to edit another and keep this. I do not understand why it works no more than one or two times?

    jollestudio

    What you say is an old story that you may have missed.

    There is a default text Style / in space of work elements 12 Expert (not quick workspace). This flaw was corrected by updating your 12 to 12.1 via Help Menu/updates to date. Have you been there and done that?

    http://www.atr935.blogspot.com/2014/03/pe12-update-121-released.html

    The blog should give details on update 12.1, including some history on 12 issue of Style of text/before the 12.1 update.

    Please let us know if you're OK with the above information and if it worked for you.

    Thank you.

    RTA

  • Cannot change the text "form received.

    I have a form of work except by submitting the text "form received" message is partially hidden under the input of the captcha area and is a different color than the text on the page.  I can't find a way to select, move and format this text in muse... Is there something that I am missing?

    form.png

    Select the form in Design view and switch between the States in the States Panel or the control bar. You can change this text for the three States other than the Normal state of course.

    Thank you

    Vinayak

  • cannot change the text in PDF format

    Hello

    Using Acrobat Pro 8.1.7 mac intel a lot of ram. I've got a PDF from a client that comes with the areas that I can change allegedly. However, I get this message:

    All or part of the selection has no available system fonts. You cannot add or remove text using the current font selected.

    Helv Neue Roman TT is the police. I have all Helv Neue but this one. If I buy it I change it?

    Acrobat 9 it would be easier?

    Thank you

    You ran over to one of the problems with the editing of PDF files. They are not really designed for this type of installation.

    You would need the "exact" font on your system and even in this case, it may not work.

    If the creator of the file being used mean and Open Type Font (works on Windows and Mac) and you had the same one, that would be your best bet.

  • Cannot change the text in the Master Page

    I don't often work in InDesign.  I had created a template file for a book back in December 2011 (initially created in CS3).  I opened this file in CS6 today and did save as.  Now it's time to change a few things to customize for this new book.  So, I went into the Master Pages to tweak things.  But, I can't edit any text.  I can click on some pictures (not all), but no text is selectable or editable.  What in the world happened to my account?

    I have also returned for the final files for the book that I did in December (not the template file, the files of actual work).  Those who give me the same behavior.  Text that should be editable is not selectable.  Once again, some photos can be selected and moved, etc. but no text/text box.

    Is there a conversion that takes place opens a CS3 file to the CS6 which causes this?  How should I do?

    Thank you

    Matt Tyree

    You can always open the objects individually using either the layers panel (which is been updated, too), or by clicking on the lock icon on the object itself (near the upper left corner).

    That said, you'll be happier if you cahng Evos preferences to allow selection of locked objects. This essentially restores the beahvior you are used to see - post is locked, but you can still select and put the content in a frame.

  • I'm unable to change the text of a document when I imported a document in PDF format in word 2013

    Cannot change the text in word after import

    Hi gfjbo,

    Please try triple click in the text block that you want to change. By default, ExportPDF performs OCR (optical character recognition), so if the PDF file has been created from a scanned document and the text of the contained image, it would have been converted into editable text by ExportPDF.

    If this does not work, please let us know and we will take it from there.

    Best,
    SAR

  • Change the text in the banner "Please complete the following form.

    I designed a form for electronic distribution. I want to make it clear to recipients that they must download the form their desktop before completing it. [I hope], this will solve the problems with browsers.

    I can overstrike the banner text "Please fill in the following form"? If so, is anyone know how?

    Of the Document Message Bar is fixed - for security reasons, you cannot change the text or turn off the bar.

Maybe you are looking for