Automation of the creation of a text layer for a user to manually add the text.

Hello

I wonder if someone can help me here?

What I want to do is to write a script that creates a text layer, stops, and then prompts the user to add their text, then save the file.

So far, I have this:

app.activeDocument = docRef

textColor = new SolidColor

textColor.rgb.red = 255

textColor.rgb.green = 255

textColor.rgb.blue = 255

helloWorldText = "Hello, World!"

newTextLayer = docRef.artLayers.add)

newTextLayer.kind = LayerKind.TEXT

newTextLayer.textItem.contents = helloWorldText

newTextLayer.textItem.position = Array (0.75, 1)

newTextLayer.textItem.size = 36

newTextLayer.textItem.color = textColor

Obviously this script adds just whatever text is in the helloWorldText line.

As I say I would like that the script stops, prompt the user to add their text, be approved, then fill the script.

Any suggestions?

Thank you

Simon

Hello

Try this...

var docRef = app.activeDocument
textColor = new SolidColor
textColor.rgb.red = 255
textColor.rgb.green = 255
textColor.rgb.blue = 255
var userText = prompt ("Please enter your message here.","");
if(userText!=""){
    newTextLayer = docRef.artLayers.add()
    newTextLayer.kind = LayerKind.TEXT
    newTextLayer.textItem.contents = userText
    newTextLayer.textItem.position = Array(0.75, 1)
    newTextLayer.textItem.size = 36
    newTextLayer.textItem.color = textColor
}

Tags: Photoshop

Similar Questions

  • Automator - randomize the file names

    Hello

    I created a service to randomize the file in a folder, randomize their file names:

    I created a shell using Automator script:

    Shell: / bin/bash cd '$1' for I in *.jpg; make $ mv RANDOM.jpg $i; fact

    I have registered as a service and also add a keyboard shortcut to use in selecting a folder to randomize the files it contains.

    It works and change all the names with random numbers and replace the original files.

    the problem is discovered only when I randomize large number of files (smth like 400-600), some files are missing from the file. No idea why?

    I ask why you are doing this, but you have taken no precautions to ensure that the same name will not be used twice. If this is the case, the first file to give this name will be overwritten.

  • Automation of the track, several keyframes at once the passage?

    Is it possible for me to pass the automation track without having to edit each individual key image? I need to move to the front of any timeline so I can extend a music track at the head of the project... But it doesn't seem to be a way to anchor the project track Automation data before moving. In other words, the project is moving, but given all the automations (volume, Pan, etc.), rest in the same place... In retrospect, I understand that I should have used automation clip... But now that I've edited a whole past mainly using my automation of the track, it would be a nightmare to have to go back and fix any small... Am I missing something?

    It's a pain when this happens and you need more space at the beginning. Probably the easiest way is to insert/Silence. Make sure that the playback cursor is positioned at the beginning. Then, go to the menu Edit and Insert/Silence. You can choose how to insert silence and all tracks, including any automation, will all move to the right by this amount.

    As a matter of interest, you can also select all points of the keyframe on a track by clicking on one of them and selecting select all keyframes. Then if you left-click on one of the selected points you can transfer all the points together to the left or right, upwards or downwards as one anywhere on this track.

    P.S. To make the Insert/Silence method works, you will need to go to preferences/multitrack and make sure that the 'adjust track keyframes when executing ripple edits' checked.

  • Automation of the seizure of the Bills in iSupplier Portal

    Hello

    We have deployed iSupplier portal in our society.

    However many many suppliers ask for alternatives as, if they can use an automated process that can enter invoices for them instead of manual intervention iSupplier portal.

    Please suggest ways that it's possible and also the advantages and disadvantages of using such an automated system.

    I know one option is to establish an interface.

    By creating an interface, it create a corresponding invoice PO?

    Our iSupplier Portal is restricted to BC invoices and we do not no PO invoices.

    Please suggest all possible options.

    Thank you very much

    Emma

    If you want to build an interface, you must fill in the specific details of the PO (PO, line number, shipping etc.) in the tables of AP interface. Once your debts running import process, it fits the Bill to the PO and create the Bill if all validations are past.

  • Automation of the vCSA 6.0 PostgreSQL database backup?

    I am looking for some suggestions in the automation of the backup of the embedded database and get these backups unloaded on our Windows, file servers.

    I prefer not to get on any part to the vCSA himself, more that I read what is usually a pain in the ass.

    I had worked to try to get the SSH keys to work with with a script of winscp, but I had no chance to get SSH keys to work with vCSA 6.0 using PuTTY.

    I'm looking for suggestions or advice.

    Oh well I think I'm half way there now after going through this.
    SUSE Linux Enterprise Server 11 - SSH Server - auth keys: World Server

    I had tried one number of other SSH keys generating guides and nothing seems to work properly until that.
    WE AT WINSCP SCRIPTING!

  • I want to export file to a specific size without changing the size of the contents of the layer. for example. the image in the layer size is 20 x 20 px, but I want the file exported in 40x40px with a transparent space.

    I want to export file to a specific size without changing the size of the contents of the layer. for example. the image in the layer size is 20 x 20 px, but I want the file exported in 40x40px with a transparent space. @divyamanian

    You can now do with the new export as a dialogue using the "Canvas size" section

  • 1 - How can I animate a layer? and how do I add the clips that I have edited in the entire video?

    I'm super new to this. I need some simple instructions to these questions are: 1 How can I animate a layer? and how do I add the clips that I have edited in the entire video? I know there is probably something on the Adobe Web site telling me these things, but I prefer this kind of thing.

    How to add effects, motion graphics in After Effects | Tutorials Adobe after effects CC

  • I created a form with fields default text for a user to update/customize.  Is there a way to style of the text, so I can quickly identify the changes to the default text in a field?

    I created a form with fields default text for a user to update/customize.  Is there a way to style of the text, so I can quickly identify the changes to the default text in a field?

    You can use a validation script customized to each text field that looks like:

    event.target.textFont = event.value = event.target.defaultValue? font. HelvI: fonts. Helv;

    This will make the text italic (Helvetica) when the field value is the value default and regular otherwise. There are other properties that you can use instead, as the field color, border width, background color, text or text size...

  • How to disable "Show indicator of overflow for the text field" for all users on a Terminal Server.

    As the title suggests, I am trying to disable the "show text overflow indicator field' for all users that connect to a remote desktop in Windows Server 2008 R2 server. The Adobe Reader software version is 9.0.

    http://content.screencast.com/users/chipthamac/folders/Snagit/media/221435ce-23a1-4fbb-8ba5-ebabe0fb1805/04.03.2013-11.00.png

    Looks like we have found a solution. We had a group of "update" policy the registry for the current user on login.  It's the key, you need to add in a GPO / your domain controller. In case you can't see in the screenshot, here's the path full key: Software\Adobe\Acrobat Reader\9.0\FormsPrefs

  • a layer for the printing of uv spot?

    Afternoon everyone,

    IM, send a job on printers that is done in Indesign, and there are 5 photographs on the front that I printed in spot uv if theyre nice and shiny and stand out.

    Then they told me that I have to create another layer for this, I'm not sure what thay mean or exactly how to do it, because I've already finished the design...

    what I have to go back and somehow change it?

    If someone could help, would be appreciated muchly!

    Thank you

    Rebecca

    Make a new layer on top.

    Add a new SPOT color to the varnish - no matter what it looks like as long as it is a spot color, and you must name if varnish to avoid confusion.

    Draw pictures on the new layer where you want the varnish and fill with the new task of color.

    VERY IMPORTANT! These frameworks SHOULD be set for a recovery if they erase your photos. Window > output > attributes in CS5.5, but I think that it can be directly under the window menu in verisons them earlier and chck the overprint area fill. You can also set this as an object Style that you can assign to Polish officials. Color and the overprint attribute can be defined in the filling of the style definition.

    You will probably want to turn off the layer of varnish for proofing, but he needs to be there for the separations. My instinct would be to export with Acrobat 6 or greater compatibility to keep the layers.

  • How to set preferences of creation for all users - machine laboratory at the University?

    I'll put up for our University editing room which has a CC license "per machine". It is a PC facility. This machine will be used by a class of students who will register with their own credentials. I need to set preferences for the first (video output, default working space planning etc. discs) so that it is the same for all users connecting from us want a consistent configuration for educational purposes and not want to help every student to configure so that it displays correctly on monitors. Is there a way to save this default setting for each user?

    The most important of them is the preferences - reading to set up the second monitor.

    Post edited by: Bruce Cooke

    Just copy the files preference and workspace of your user folder.

    Mylenium

  • Is it possible to set up for multiple users on the same computer to avoid entering the e-mail and the password

    Original title: Multi users

    Is it possible to set up for multiple users on the same computer to avoid entering the email and password every time that a new user want to check emails?

    Hello

    Welcome to the community forums of Microsoft and thanks for posting the question. According to the description, you need help in the creation of multiple user accounts. I've surely you will help find a solution on the issue.

    What is the operating system installed on the computer?

    User accounts, several people can easily share a single computer. Each person can have a separate user account with unique settings and preferences, such as a screen saver or desktop background. User accounts control files and programs users can access and what types of changes users can make to the computer. As a general rule, you'll want to create standard accounts for most computer users.

    If you use Windows Vista or Windows 7, see the article below:

    Create a user account

    http://Windows.Microsoft.com/en-in/Windows7/create-a-user-account

    http://Windows.Microsoft.com/en-in/Windows-Vista/create-a-user-account

    For Windows XP users:

    How to create and configure user accounts in Windows XP

    http://support.Microsoft.com/kb/279783?WA=wsignin1.0

    Hope this information helps. Answer please if you have more queries about Windows.

  • Impossible to manually add the wireless network

    I need to manually add a wireless network to the laptop. When I click on add in the wireless connection properties window, however there is no pop-up window. If I try on a similar laptop windows wireless network properties appears. The Wireless Auto-Configuration service is started. How can I get the wireless network properties window?

    I was finally able to solve this problem and I posted the results on another forum, I used for this purpose.  Here is the text exactly as I posted on the other forum.  It answers some of your questions.
    Regarding other software that manages the wireless card, Yes, there are (Atheros), he was not managing the adapter (off a long time ago), however, to be sure, I removed it to run in the registry.

    Here is the text of how I solved the problem, I mentioned.  If you have more questions, feel free to post them.

    *****

    I am just posting this here because I could solve the problem and not able to find a reliable source on the internet on a fix for this and for a problem that is the result of my attempts to fix it.

    This is the situation and my landline.

    I was getting this error message

    "Impossible to migrate dependent packages.

    After trying to install a pacakage KB. It did not matter that one but they have been associated with the Wireless settings.

    I continued to try to install the newer packages.
    KB893357
    KB917021
    KB918997

    Each gave me the same message

    "Impossible to migrate dependent packages.

    I read online that I install KB937143 (update IE7) could help.

    I did this and still got the same message on dependent modules.
    I also had another problem occur.
    In the section my network places properties connection wireless adapters, whenever I clicked the Add button / PROPERTIES without window appears to allow me to change the settings, however, I was able to remove items from the preferred networks window.

    My Automatic Configuration Service wireless is running and took Windows to configure my wireless settings.

    I downloaded the updates for my driver Wlan (WiFiHP 500) and I still had the same problems.

    I restarted KB918997 using the/log option and read the log file. This is the last important lines:

    33.849: MigrateHotfix: hotfix migration KB937143
    34.129: migrating QFE KB937143 with command line: update.exe z q - B: sp2qfe
    36.783: failed 1603 Update.exe.
    36.793: MigrateHotfixes: KB937143 Migration failed
    36.793: DoInstallation: Migration failed
    36.933: failed to migrate dependent packages.
    39.597: message displayed to the user: cannot migrate dependent packages.

    I then uninstalled the KB937143 package and reinstalled KB918997 update with the newspaper of Pétion and he went along. I also tested the buttons add and PROPERTIES in the window of Favorites and those networks worked too.

    I checked the logfile KB918997 and he showed this:
    42.311: MigrateHotfix: hotfix migration KB932168 have
    42.511: migrating QFE KB932168 have with the command line: update.exe z q - B: sp2qfe
    88.768: MigrateHotfix: Hotfix KB932168 successfully migrated
    88.768: MigrateHotfixes: return code: 3010
    88.928: DoInstallation: Migration succeeded

    As a side note, I restarted the laptop frequently just to be sure.

    So, really, the option of running with the Ko log file helped me diagnose the problem.

  • Easy way to change the label of the field for all user interfaces?

    How a client would change a label field for all user interfaces that use this field or attribute, which is not really a translation?

    What I have found seems to be that we would need to edit Resource Bundles and it will be much easier in version 8:

    1. the information on Resource Bundles in https://blogs.oracle.com/fadevrel/entry/translating_your_customizations section has this key passage:

    It is a standard open sector (OASIS) XML file with the extension .xliff format and store translated values for strings used by the ADF running. The general process is that these values are exported from the MDS, modified manually and then imported into the new repository. This must be done by an administrator, either via Enterprise Manager or WLST orders according to the screenshot below. It is detailed on the merger application Extensibility Guide.

    2. this blog announcement also says that it will be easier in version 8:

    Currently planned for version 8 is what we call the UI (UI) text editor. This tool will allow the mounting of all the text on the pages and merge request forms. This will provide a search based on an expression or a Word, say 'Worker' and will allow it to be adjusted, tell 'Employee', which then updates all the resource bundles that contain.

    3. I found video, How to customize field labels , but it seems that it is a label of the user interface at the same time...

    WIlliam, Yes, and we have a documentation and/or videos on this feature when R8 is available.

  • Flow of text/image for a user manual

    Greetings. I'm working on a layout for a user manual. I encountered a problem with the flow of text and images in many cases where the instructions of the manual to a step by step format. Please see the screenshot at the end of the post.

    You will see in the bottom half of the page one of these sequences step by step starts. The 1st image is related to step 1 and 2 in step 2. I want the image to align with the capline of the 1st sentence at each stage and the image must stay in line on the right and the left-aligned text. Here's where I have problems: I don't want to give a space - after replacing every step in order to align the next step with the next image.

    I tried to put the image inline with the text and by aligning his right of paragraph but then I can't align the image with the capline of the 1st sentence in step; the image is before or after the line of text. I also tried dressing jump object, but which becomes immediately problematic when a stage has several lines of text.

    What is the best practice here? I think I lack something real simple. Also, if it's important I have an author on InCopy assignments of edition we're going.

    Screen-Shot.jpg

    Try following:

    You need:

    • 2 paragraph styles
    • 1 object model for image
    1. Specify a paragraph for the numbered list Style as stated above. (But it can be any other model also) I call it 'the list '.
    2. Specify where the image is embedded in a paragraph Style. I call it 'Anchor Image'
      1. Left, the intention is wide the first character to be so far to the right, that this is in the area of the image, would make so vast that it is near the right edge, for example if the frame is 200 mm, you can do left intend 198 mm
      2. The size is not serious, in the example, it is 0.1pt, 0, driving, before 0space and after.
      3. Keep options: Keep with 10 lines (or whatever the number is useful.)
      4. Insert the frame anchored in this paragraph
    3. The style of the object must have following properties:
      1. Text wrapping, I did it with 1 p to the left and to the right, 0mm above and below the rectangle shape
      2. Anchored the position of the image: right 0mm to the right vertical edge, specify a distance between the upper edge of the frame on the insertion will be always to the desired line at the top of the page of the reference.

    The wrapping of the text of the framework will force the number text (with the style of paragraph 'List' of the film, but also the next holder of the anchor with the paragraph style 'Anchor Image' to wrap.) Because the left for the anchoring of the Image style of paragraph is far to the right it will require to start after the space of the image below. Because the font sizes of this paragraph are so small, it will not appear, and you can specify the minimum vertical distance between a number o the previous image with text list encapsulate parameters, you might get closer with negative after space. As an anchor image contains no text, it is not a problem.

Maybe you are looking for