w30290083o9nn
Participant
w30290083o9nn
Participant
Activity
‎Mar 09, 2025
07:25 AM
Thank you for your help, thank you
... View more
‎Mar 09, 2025
12:49 AM
1 Upvote
Thank you very much, thanks
... View more
‎Mar 05, 2025
10:06 PM
I have tried, but it seems there is no response.
... View more
‎Mar 05, 2025
07:00 PM
How to use a .psjs file in Photoshop to call a .jsx file, for example, if the content of the .jsx file is: alert("Hello");
... View more
‎Feb 22, 2025
08:36 PM
Thank you for your reply. I understand that it can be done using patterns, but my requirement is not just to draw rectangles. Later, I will convert the drawn rectangles into selections, then copy each piece of the image and export them to a folder.
... View more
‎Feb 22, 2025
07:51 PM
Thank you for your reply
... View more
‎Feb 22, 2025
07:37 AM
I want to draw layered rectangular shape layers in the image, similar to a brick effect, but I don't know how to accomplish this. The image below was manually pieced together. I hope to control the number of brick columns using variables Thank you all for your help
... View more
‎Jan 17, 2025
08:19 PM
1 Upvote
I’m very sorry, I forgot to change it to this symbol: %u000d in the text. Thank you, I really appreciate it. It works now. You’re truly awesome!
... View more
‎Jan 17, 2025
06:23 PM
var AB1 = File("C:/Users/Administrator/Desktop/1.txt");
AB1.open("r");
var AB1sz1 = AB1.read();
app.activeDocument.activeLayer.textItem.contents = unescape(AB1sz1); Sorry, it still doesn't work. Are there any other methods? Thank you.
... View more
‎Jan 17, 2025
05:27 AM
‎Jan 17, 2025
05:26 AM
app.activeDocument.activeLayer.textItem.contents = "Photoshop\r2025"; The above code can break lines correctly. The text below, read from 1.txt, does not break lines. Why is that? How can I make it break lines when reading from a txt file? I know paragraphs can break lines, but I don't want to use paragraph tags. Thank you, everyone. 1.txt=Photoshop\r2025 var AB1 = File("C:/Users/Administrator/Desktop/1.txt");
AB1.open("r");
var AB1sz1 = AB1.read();
app.activeDocument.activeLayer.textItem.contents = AB1sz1;
... View more
‎Jan 01, 2025
03:27 PM
2 Upvotes
Thank you very much, thank you.
... View more
‎Jan 01, 2025
03:25 PM
Generated through AI and completed by combining codes from the forum.
... View more
‎Jan 01, 2025
06:24 AM
#target photoshop
var originalText = "AAAAAAAAAA"; // Original text
var newText = "bbbbbbbbbb"; // New text
// Get the current document
var currentDocument = app.activeDocument;
// Recursively traverse layer sets, including group layers
function traverseLayerSet(layerSet) {
for (var i = 0; i < layerSet.layers.length; i++) {
var layer = layerSet.layers[i];
// If the layer is a group, recurse into it
if (layer.typename == "LayerSet") {
traverseLayerSet(layer); // Recursively traverse layers within this group
}
// Check if the layer is a text layer
else if (layer.kind == LayerKind.TEXT) {
// Get the text content of the layer
var textContent = layer.textItem.contents;
// Check if the text matches the original text
if (textContent === originalText) { // Find the content
// Select the layer based on its index
currentDocument.activeLayer = layer;
var actionReference = new ActionReference();
actionReference.putClass(stringIDToTypeID("typeCreateOrEditTool"));
var actionDescriptor = new ActionDescriptor();
actionDescriptor.putReference(stringIDToTypeID("null"), actionReference);
executeAction(stringIDToTypeID("select"), actionDescriptor, DialogModes.NO);
var actionReference2 = new ActionReference();
actionReference2.putProperty(stringIDToTypeID("property"), stringIDToTypeID("tool"));
actionReference2.putEnumerated(stringIDToTypeID("application"), stringIDToTypeID("ordinal"), stringIDToTypeID("targetEnum"));
var font = executeActionGet(actionReference2)
.getObjectValue(stringIDToTypeID("currentToolOptions"))
.getObjectValue(stringIDToTypeID("textToolCharacterOptions"))
.getObjectValue(stringIDToTypeID("textStyle"))
.getString(stringIDToTypeID("fontPostScriptName"));
// Get the font
alert(font);
layer.textItem.contents = newText; // Replace the text
}
}
}
}
// Start traversing the top-level layers (including layer sets)
traverseLayerSet(currentDocument); As shown in the image, each text layer uses a different font. I want to use the code above to read the fonts from different text layers, but there is an issue. It fails to read the fonts from different layers, and the font retrieved is always the same, even though all my text layers have different fonts. If I use alert(app.activeDocument.activeLayer.textItem.font);, I can successfully retrieve the font, but some fonts trigger an error message: Error 8500: The requested property does not exist. Line: 1 ->
... View more
‎Dec 17, 2024
04:04 AM
Could you please send the action file? Thank you.
... View more
‎Dec 14, 2024
05:22 AM
Keep only the QR code image and crop out the rest.
... View more
‎Dec 14, 2024
02:28 AM
There are probably hundreds of them, and the position of the QR code on each image is different, so they cannot be cropped in a centralized manner.
... View more
‎Dec 14, 2024
01:19 AM
jpg
... View more
‎Dec 14, 2024
12:01 AM
How to extract the QR code from an image? The two images below are provided as references, as I have many images, and the positions of the QR codes vary. Thank you, everyone
... View more
‎Dec 12, 2024
11:39 PM
Your suggestion is great, I'll give it a try. Thank you!
... View more
‎Dec 12, 2024
11:23 PM
How to identify the largest black area in an image? Create a selection around the largest black area, as shown in the image: There are many black areas in the image, each varying in size and position. The goal is to identify the largest black area and create a selection around it. I'm confused and don't know how to achieve this. Thank you, everyone.
... View more
‎Dec 12, 2024
02:51 AM
1 Upvote
Thank you
... View more
‎Dec 12, 2024
01:57 AM
Thank you very much. I'll give it a try. I searched the forum before, but I couldn't find anything. Thank you again.
... View more
‎Dec 12, 2024
01:55 AM
That's fine. You can add numbers sequentially afterwards, such as TXT plus a number. Thank you.
... View more
‎Dec 12, 2024
01:23 AM
1 Upvote
How can I change the names of the currently selected layers? For example, if there are many layer names and I have selected only a portion of them, how can I rename the selected layers? Thank you, everyone.
... View more
‎Nov 16, 2024
08:37 PM
Thank you, it works! I really appreciate it
... View more
‎Nov 16, 2024
07:36 PM
Hi, friends, I would like to ask how to check if an action exists in Photoshop. For example, if my action set is named 'Default Actions1' and the action is named 'Molten Lead2', how can I use a JSX script to check if 'Default Actions1' exists, and if 'Molten Lead2' exists? Thank you, everyone.
... View more
‎Oct 05, 2024
12:45 AM
When I use the font: Adobe Heiti Std, and type text in the image, the code will prompt that it cannot retrieve the text attributes. However, when I use a different font and then switch to Adobe Heiti Std, I can retrieve the text attributes.
... View more
‎Oct 05, 2024
12:38 AM
When I use the font: Adobe Heiti Std, and type text in the image, the code will prompt that it cannot retrieve the text attributes. However, when I use a different font and then switch to Adobe Heiti Std, I can retrieve the text attributes.
... View more
‎Oct 05, 2024
12:05 AM
Sorry, the hint is: the requested attribute does not exist.
... View more