• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Automate centering selected text?

Explorer ,
Jan 12, 2023 Jan 12, 2023

Copy link to clipboard

Copied

Hello ladies and gentlemen!

I'm a newbie of photoshop, and I have very little experience in automating batch. If my request is impossible or dumb, please give me your opinion, thanks everyone!

I'm here to ask if there is any solution to center a selected text layer placed on top of an object automatically? I used to make a selection from a shape, then use align at the Move tool. But the designs are increasingly complex - many layers overlap, or sometimes the shapes are not fully visible on the screen, so I'm not usually find each shape one by one. I used magicwand instead (tolerance 80-150). However, having to create each selection for each text layer then align it also takes a lot of time. For each text layer (not all of them, just a selected one), I need area auto-select - center horizontal, vertical - deselect in one action. Here is an example:

 

Le27921535n6i8_2-1673588388008.pngLe27921535n6i8_3-1673588479287.png

 

Le27921535n6i8_5-1673588520414.png

 

The work I am doing is designing scrapbooks, guestbooks as gifts, each design will not have a fixed text position, so batching is not possible for every different styles. 

I've searched for related scripts, but they don't seem to be suitable. If you have any suggestions, please comment below. Thank you everyone and have a nice day!

 

TOPICS
Actions and scripting , Windows

Views

480

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Expert ,
Jan 12, 2023 Jan 12, 2023

Copy link to clipboard

Copied

@Le27921535n6i8 – Your PSD layers lack the necessary structure to easily automate with actions or scripts.

 

If each separate text layer and the other associated layers were grouped together in a layer group or smart object, then there would be something to work with.

 

Even if the shape was directly under the text layer, there would be some repeatable structure to work with.

 

If you name the layers with generic names (Text layer 1, Text layer 2) that differ from the actual text content, you can then select text layers by name, and also select relative layers below the selected text layer in an action to load selections from and to use for alignment.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 12, 2023 Jan 12, 2023

Copy link to clipboard

Copied

Hello, indeed, I think that anyways, using smart objects could be a godsend if the work done is repetitive. They could be stored in libraries, with different styles, and you just double-click to edit, instead of having to create a txt block and a frame each time.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 12, 2023 Jan 12, 2023

Copy link to clipboard

Copied

Hello dear,

Thank you for comment! That's a good idea, maybe I'll use that in the future.

However, sometimes I will have to receive designs as flattened layers, or the layers get mixed up. Since they are already approved, it's hard asking for them to be edited again:

Le27921535n6i8_0-1673593746291.png

Anyway, I used magic wand and get the good results, so I don't always need splitted layers too.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 12, 2023 Jan 12, 2023

Copy link to clipboard

Copied

To automate ;

 

  • Create selection from shape
  • Align Type layer to active selection

you can record action but there are few problems or requirements. If you have different number of shapes and Type layers per file that is making task very difficult for action or script.

 

Its not dificult to record step in action to create selection from shape but you must select that shape before making selection either manually or by recording shape layer name directly into step. So every time you run action shape layer with that particular name must be present in Layers panel.

 

The next step is to align text to selection right? To do that you must select Type layer with text either manually then to run step to align or using action step but that Type layer must be alaways in the same relative position or always to have same name so you can record layer name in action step.

 

Conclusion, to make it simple for start: put Type layer with text just above shape. Record step to create selection from shape then step to select layer above and lastly to align current layer. Before running action select manually layer with shape. Thats easiest explanation and option that comes to my mind. 

align to selection.jpg

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 12, 2023 Jan 12, 2023

Copy link to clipboard

Copied

Hello dear,

Thanks for your opinion! As I described above, creating selection from a shape is not always possible because many layers overlap, or sometimes the shapes are not fully visible.

So sorry for not giving specific examples on the post, but sometimes I will have to encounter overlapping shapes like this and can not just create selection from shape:

Le27921535n6i8_0-1673591253832.png

 

Le27921535n6i8_2-1673591540948.png

I know this is probably pretty quick with the one-click magic wand, but I'm having to center text layers of 100+ designs like that. I've got an action that automatically applies a different script/action to each text layer needed, but couldn't find a solution with the selection.

Anyway, the designs are from multiple people working in different processes, I can't ask them to separate the layers more clearly as that would be troublesome. Sometimes what I get is just a flatten png file. XD

By the way, thanks for your enthusiastic help! Hope to get more comments from you!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 12, 2023 Jan 12, 2023

Copy link to clipboard

Copied

"Sometimes what I get is just a flatten png file."

 

What you think, is there any software out there to automate such task? I do not think. From your description this is task for human only. Sometimes you need to align to shape, other times to the same shape below and other times to intersection between two shapes. But when, using what rules? How to explain that to software? 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 12, 2023 Jan 12, 2023

Copy link to clipboard

Copied

LATEST

I think making a selection around the text would be fine. I once found this script in a forum:

https://www.mediafire.com/download/6333tjwsbcm5smx/Autocenterv1.00.jsx 

This script worked well, but it changed my solution files and some settings. Of course I could fix it later, but the script process is so complicated that my computer sometimes becomes laggy. I can't contact its creator to fix it because the forum closed years ago.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines