r-bin
People's Champ
r-bin
People's Champ
Activity
Mar 10, 2025
10:25 PM
how to camera raw previous settings apply with java script
... View more
Feb 25, 2025
01:29 AM
@patricktheart
If you lose your preferences in minor dot updates, something's wrong, like not having full administrator privileges in your user account.
With a major whole-number version update, preferences do not carry over, they never have. There is an option to migrate preferences, but I don't recommend it because of the high risk of accumulated errors carrying over as well.
As for actions, brushes, anything that can be saved out - save out and keep it in a safe place. Then it can always be easily reloaded.
... View more
Feb 18, 2025
02:28 AM
Save as, does not include .jpg anymore!
By @idimtsas
JPEG is a rather restrictive format, requiring: A flattened image (no floating layers), 8 bpc, no alpha channels. If the current file doesn’t meet this criteria, then one has to Save a Copy, or enable Legacy Save As in your File Handling Preferences/Settings.
If your file is in 32 bpc mode, then it needs to first be converted to 16 or 8 bpc before Save a Copy/Legacy Save As can list JPEG.
Note that Export As silently performs background conversions so that JPEG is always available without having to take extra steps.
... View more
Jan 31, 2025
02:41 AM
Hello, it's been a while! Sicnce the Adobe "engineers" are hopeless (They really are, they can connect to your PC to find a simple solution, and you can see by the operator, they barely can use a computer and never resolving any issues), did you find any solution exept opening and saving a different file, or restarting the computer? Thanks a lot!
... View more
Community Expert
in Photoshop ecosystem Discussions
Jan 20, 2025
11:12 PM
1 Upvote
Jan 20, 2025
11:12 PM
1 Upvote
I found unexpected randomness when PS placed the images - the images were mostly centered; but not quite. You enabled me to automate what I was having to do manually - it's euphoric when I can automate such things.
By @musekic
The Place command and Smart Objects use the PPI value of the raster images being placed and the PPI value of the receiving document to determine sizing. So I am not sure if that is part of the issue with placement and centre alignment or not.
... View more
Jan 18, 2025
05:55 AM
I have a function that I want to run initially and repeat every 30 seconds. The task of the function is to get the active file in Photoshop and write it to a text file. I just couldn't implement the periodic timing every 30 seconds. How can I do this?
... View more
Jan 04, 2025
10:42 PM
thank you a million times over, this finally worked when none of the other methods did.
... View more
Jan 02, 2025
06:58 AM
BROTHER YOU GIVEN A SCRIPT IN 2020 FOR ADD A FILE NAME IN IMAGE IT'S NOW DAYS HELPING ME A LOT THANKS FOR THAT BUT I'M FACING ONE PROBLEM AND ONE NEEDFUL THING 1ST AND IMPORTANT IS AFTER RUN THIS SCRIPT IF MY FILE IS BIGER SIZE IN INCHES IT REDUCED PLEASE DESABLE THAT SO FILE SIZE DONT CHANGE AND 2ND POINT WAS IF YOU CAN PROVIDE A OUTLINE IN TEXT OF 5 PIXEL, SO THIS SCRIPT CAN TOTALLY USE FULL FOR ME AND I THANKFUL FOR THAT SCRIPT BUT IT CAN BE USEFULL FOR ME IN ONLY SMALL SIZE IMAGE PLEASE BRO SOLVE MY THIS PROBLEM TOTALLY APPRICIATED YOU BROTHER HERE A LINK OF THAT QUERY https://community.adobe.com/t5/photoshop-ecosystem-discussions/using-a-script-to-add-a-file-name-to-an-image/m-p/10842950 AD THIS IS THE ORIGNAL SCRIPT #target photoshop testText(); function testText(){ if(documents.length > 0){ var originalDialogMode = app.displayDialogs; app.displayDialogs = DialogModes.ERROR; var originalRulerUnits = preferences.rulerUnits; preferences.rulerUnits = Units.PIXELS; try{ var docRef = activeDocument; var LayerRef = docRef.artLayers.add(); LayerRef.kind = LayerKind.TEXT; var TextRef = LayerRef.textItem; var fileNameNoExtension = docRef.name; //this section removes the file extension fileNameNoExtension = fileNameNoExtension.split('.'); if(fileNameNoExtension.length > 1){ fileNameNoExtension.length--; } fileNameNoExtension = fileNameNoExtension.join('.'); // TextRef.contents = fileNameNoExtension; //this section positions the text and sets text parameters TextRef.position = new Array(0, 0); preferences.rulerUnits = Units.POINTS; TextRef.size = 96; TextRef.useAutoLeading = false; TextRef.leading = 42; TextRef.font = 'Calibri-Bold'; TextRef.justification = Justification.CENTER; TextRef.autoKerning = AutoKernType.METRICS; // } catch(e){ preferences.rulerUnits = originalRulerUnits; app.displayDialogs = originalDialogMode; return; } preferences.rulerUnits = originalRulerUnits; app.displayDialogs = originalDialogMode; } else{ alert('You must have a document open to run this script.'); return; } }
... View more
Jan 01, 2025
09:38 AM
I followed step by step, and is not adding the new selection to a previous selection mask. Are there any other properly working methods?
... View more
Dec 29, 2024
06:49 AM
1 Upvote
Thank you Stephen for your explanations.
... View more
Dec 23, 2024
06:29 AM
Hey @glibshaft ! How did you get this working in Illustrator? I need it to!
... View more
Dec 19, 2024
03:22 PM
Sorry the code i was showing was incorrect, this is what I was referring to... still does not work: var layers = doc.layers;
for (var i = 0; i <layers.length; i++) {
if (selection_from_channel("mask")){
try {
var b = activeDocument.selection.bounds;
} catch(e) { alert("No selection"); }
alert(b);
}
}
... View more
Dec 17, 2024
07:34 AM
1 Upvote
I was also having this issue, and your thread was referenced from my thread, wanted to post here in case it helped you or anyone else that I've determined the cause in my case was having app.doAction("action","set"); in the script. If you comment that out temporarily to record it it records fine. There may be other "problem" lines that also trigger this, so if you weren't scripting an action, just comment your entire file, record it as a step, then uncomment it and it should continue to work fine. Unideal, but better than not being able to record it, or having to rearrange your entire file organization to put things in the Presets / Scripts folder.
... View more
Dec 16, 2024
08:05 AM
1 Upvote
Thank you! I've updated the script by working version with classic approach. But still planning to try your short code for grouping and merging.
... View more
Dec 13, 2024
01:56 PM
Hello! I did that and it still did not work. What could i do instead?
... View more
Dec 11, 2024
07:29 PM
OK here's the update, finally after 9 attempts with GTP, its working correctly 1000% now. //////////////////////////////////////////////////////// function get_selected_layers_idx() { try { var r = new ActionReference(); r.putProperty(stringIDToTypeID("property"), stringIDToTypeID("targetLayers")); r.putEnumerated(stringIDToTypeID("document"), stringIDToTypeID("ordinal"), stringIDToTypeID("targetEnum")); try { var list = executeActionGet(r).getList(stringIDToTypeID("targetLayers")); } catch (e) { var r = new ActionReference(); r.putProperty(stringIDToTypeID("property"), stringIDToTypeID("itemIndex")); r.putEnumerated(stringIDToTypeID("layer"), stringIDToTypeID("ordinal"), stringIDToTypeID("targetEnum")); return [ executeActionGet(r).getInteger(stringIDToTypeID("itemIndex"))-1 ]; } var selected_layers = new Array(); for (var i = 0; i < list.count; i++) selected_layers.push(list.getReference(i).getIndex()); return selected_layers; } catch (e) { alert(e.message +"\nline:"+e.line); } } //////////////////////////////////////////////////////// function get_layer_info(idx) { try { function transform(p, xx, xy, yx, yy, tx, ty) { var x = p[0]; var y = p[1]; p[0] = xx * x + yx * y + tx; p[1] = xy * x + yy * y + ty; } var doc = app.activeDocument; var old_units = app.preferences.rulerUnits; app.preferences.rulerUnits = Units.PIXELS; var w = doc.width.value; var h = doc.height.value; app.preferences.rulerUnits = old_units; var r = new ActionReference(); r.putProperty(stringIDToTypeID("property"), stringIDToTypeID("textKey")); r.putIndex(stringIDToTypeID("layer"), idx); var tkey = executeActionGet(r).getObjectValue(stringIDToTypeID("textKey")); var xx = 1, xy = 0, yx = 0, yy = 1, tx = 0, ty = 0; if (tkey.hasKey(stringIDToTypeID("transform"))) { xx = tkey.getObjectValue(stringIDToTypeID("transform")).getDouble(stringIDToTypeID("xx")); xy = tkey.getObjectValue(stringIDToTypeID("transform")).getDouble(stringIDToTypeID("xy")); yx = tkey.getObjectValue(stringIDToTypeID("transform")).getDouble(stringIDToTypeID("yx")); yy = tkey.getObjectValue(stringIDToTypeID("transform")).getDouble(stringIDToTypeID("yy")); tx = tkey.getObjectValue(stringIDToTypeID("transform")).getDouble(stringIDToTypeID("tx")); ty = tkey.getObjectValue(stringIDToTypeID("transform")).getDouble(stringIDToTypeID("ty")); } var x0 = tkey.getObjectValue(stringIDToTypeID("bounds")).getUnitDoubleValue(stringIDToTypeID("left")); var y0 = tkey.getObjectValue(stringIDToTypeID("bounds")).getUnitDoubleValue(stringIDToTypeID("top")); var x1 = tkey.getObjectValue(stringIDToTypeID("bounds")).getUnitDoubleValue(stringIDToTypeID("right")); var y1 = tkey.getObjectValue(stringIDToTypeID("bounds")).getUnitDoubleValue(stringIDToTypeID("bottom")); var p1 = [[x0, y0], [x1, y0], [x1, y1], [x0, y1]]; var ch = tkey.getObjectValue(stringIDToTypeID("textClickPoint")).getUnitDoubleValue(stringIDToTypeID("horizontal")); var cv = tkey.getObjectValue(stringIDToTypeID("textClickPoint")).getUnitDoubleValue(stringIDToTypeID("vertical")); tx += w * ch / 100; ty += h * cv / 100; transform(p1[0], xx, xy, yx, yy, tx, ty); transform(p1[1], xx, xy, yx, yy, tx, ty); transform(p1[2], xx, xy, yx, yy, tx, ty); transform(p1[3], xx, xy, yx, yy, tx, ty); var l = Math.min(p1[0][0], p1[1][0], p1[2][0], p1[3][0]); var r = Math.max(p1[0][0], p1[1][0], p1[2][0], p1[3][0]); var t = Math.min(p1[0][1], p1[1][1], p1[2][1], p1[3][1]); var b = Math.max(p1[0][1], p1[1][1], p1[2][1], p1[3][1]); var mid_x = (l + r) / 2; var mid_y = (t + b) / 2; var r = new ActionReference(); r.putProperty(stringIDToTypeID("property"), stringIDToTypeID("name")); r.putIndex(stringIDToTypeID("layer"), idx); return [executeActionGet(r).getString(stringIDToTypeID("name")), mid_x, mid_y]; } catch (e) { alert("Error in get_layer_info: " + e.message +"\nline:"+e.line); } } //////////////////////////////////////////////////////// function processSelectedLayers() { try { var doc = app.activeDocument; // Open file to save results var desktop = Folder.desktop; var file = new File(desktop + "/LayerMidXValues.txt"); file.open("w"); // Get active layers var idx = get_selected_layers_idx(); var n = 0; try { activeDocument.backgroundLayer } catch (e) { n = 1; } // Ask for confirmation once before processing all layers var userConfirmed = confirm("You are about to process " + idx.length + " layer(s). Click OK to continue."); if (!userConfirmed) { return; // Stop if the user cancels } // Process all layers after confirmation for (var i = 0; i < idx.length; i++) { var info = get_layer_info(idx[i] + n); // Save to file file.writeln("Layer Name: " + info[0]); file.writeln("Mid X: " + info[1].toFixed(2)); file.writeln("Mid Y: " + info[2].toFixed(2)); file.writeln("-----------------------"); } // Close file file.close(); alert("Results saved to LayerMidXValues.txt on desktop."); } catch (e) { alert("Error in processSelectedLayers: " + e.message +"\nline:"+e.line); } } //////////////////////////////////////////////////////// // Run the script processSelectedLayers();
... View more
Dec 11, 2024
01:59 PM
This worked! Thank you so much!😃👍
... View more
Dec 11, 2024
02:58 AM
Read this thread as I am having the same issue but I still can't get the right result. How did you end up doing it? thanks
... View more
Dec 10, 2024
03:10 PM
A good point.
... View more
Dec 07, 2024
04:23 PM
2 Upvotes
How do you verify that it "refuses to apply the sRGB color profile"? ..... BTW - there is no such thing as "plain RGB". There is always some RGB color space. By @D Fosse It looks like there are 32 bit images there
... View more
Dec 03, 2024
03:34 AM
1 Upvote
I have solved my problem, thank you very very very much for your help!
... View more
Dec 02, 2024
05:05 AM
Oh, it's just amazing what scripts can do! I've updated the script to single .jsx version.
... View more
Dec 02, 2024
02:08 AM
1 Upvote
r-bin That's got it!
... View more
Community Expert
in Photoshop ecosystem Discussions
Dec 02, 2024
12:25 AM
1 Upvote
Dec 02, 2024
12:25 AM
1 Upvote
1. Create a layer and turn it into a smart object.
2. Replace the content with the saved psd file with the correction.
Just placing the file should suffice.
As a last step Layer > Ungroup Layers or changing the Blend Mode of the Group to »Pass Through« might be necessary.
... View more
Nov 29, 2024
11:06 AM
I messed up a few things (my screen layout but fixed it) but and unhid all of Users, loaded the .xmp files for the DeHaze preset and it now works. Thanks to all who helped.
... View more
Community Expert
in Photoshop ecosystem Discussions
Nov 28, 2024
01:14 AM
1 Upvote
Nov 28, 2024
01:14 AM
1 Upvote
If your files consistently contain Path 1, then do not select a path before converting to a selection. Instead, use Ctrl + click on the path's thumbnail to load the selection while recording; it should work without any issues. I believe you always have Path 1 in your files because there isn't an Insert Path step.
Here is how action should appear from the outset:
... View more
Nov 27, 2024
12:54 PM
Amazing! Thank you so much. Works perfectly.
... View more
Nov 27, 2024
07:09 AM
Thank you! Looks like this was a perfect solution. Now I just need to hit one key to load the plugin, and it seems to work fine.
... View more
Community Expert
in Photoshop ecosystem Discussions
Nov 23, 2024
02:46 PM
1 Upvote
Nov 23, 2024
02:46 PM
1 Upvote
@c.pfaffenbichler
Thanks! I have corrected the link.
... View more
Nov 22, 2024
01:01 PM
If you have Windows, try changing the priorities of tasks. Photoshop needs to be lowered, the player needs to be raised. How
... View more