IanBarber
Contributor
IanBarber
Contributor
Activity
‎Oct 03, 2024
02:15 AM
That's great to know that your issue has been resolved. I'll move this thread to discussion for now.
Thanks,
Shivani
... View more
‎Sep 11, 2024
07:23 AM
@SHP Photography with the recent update Adobe Photoshop Version: 25.12.0 20240903.r.806 055f5e9 arm64 your issue should be fixed. Please let us know if you see the fix.
Thanks,
Cory - Photoshop Product Manager
... View more
‎Jul 10, 2024
06:25 AM
Same. If I do a 'save and close' on document in PS and want to do something in Bridge for instance, PS comes to the front when the document closes. Bloody annoying.
... View more
‎Sep 11, 2024
07:23 AM
@SHP Photography with the recent update Adobe Photoshop Version: 25.12.0 20240903.r.806 055f5e9 arm64 your issue should be fixed. Please let us know if you see the fix.
Thanks,
Cory - Photoshop Product Manager
... View more
‎May 22, 2024
09:46 AM
I am surprised this got through Beta testing and into a public release
... View more
‎May 14, 2024
08:04 AM
Odd - we use this a lot when transferring users to new machines.
Using the export feature this is what comes over:
... View more
‎Jan 03, 2024
04:41 AM
When you open a file it's set to "Colors", but if you click a single channel and then go back to RGB, it reverts to "RGB" mode and stays there.
Nifty!
I hadn’t noticed that.
And as selecting the Red Channel and the Composite Channel can be recorded in an Action one should be able to assign such an Action to the Open Event with Script Events Manager.
... View more
‎Nov 03, 2023
10:27 AM
Does anyone know how to pass a parameter when we do that suspendHistory? app.activeDocument.suspendHistory(localize(locCreateCustomFrameDialog), 'createCustomFrameDialogMain.Main(createCustomFrame)'); this return evalScript error. Tried a couple other method like adding 'createCustomFrame' but that will not work. This also causes evalScript error app.activeDocument.suspendHistory(localize(locCreateCustomFrameDialog), "createCustomFrameDialogMain('"+createCustomFrame+"')");
... View more
‎Oct 18, 2022
01:56 PM
This issue should be fixed in Photoshop 2023 (v24.x) that was released today.
... View more
‎Sep 30, 2022
10:44 AM
Thank you to all for explaining what this is
... View more
‎Sep 21, 2022
08:29 AM
I have been having this issue for a long time, even with the latest version of Photoshop and MAC OS still never got it fixed
... View more
Community Expert
in Photoshop ecosystem Discussions
‎Sep 15, 2022
05:36 PM
1 Upvote
‎Sep 15, 2022
05:36 PM
1 Upvote
@alexanderb84827006
It is mentioned in various Adobe files, such as the Photoshop JavaScript Reference PDF:
However, I agree that one does have to look hard for such info!
Also:
https://theiviaxx.github.io/photoshop-docs/Photoshop/Application/charIDToTypeID.html?highlight=charid
... View more
Community Expert
in Photoshop ecosystem Discussions
‎Jun 05, 2022
09:44 PM
1 Upvote
‎Jun 05, 2022
09:44 PM
1 Upvote
"I have tried to re-create this but unable to do it. Does anyone know how to ?"
If you really, really need exactly same action step (I can not imagine the reason) but you can not recreate it then Alt + drag action step to duplicate it then move it anywhere in the same or some other action.
... View more
‎Dec 14, 2021
08:05 AM
Hmm I'm not seeing any difference with the Fade command between versions. It's never updated realtime as you slide the opacity slider, it only updates when the cursor stops moving. I agree it could be smoother overall.
... View more
‎Nov 02, 2021
08:08 PM
1 Upvote
Others have reported that when their NAS is configured to "sleep" after periods of not being used, when they start LR, the NAS takes a while waking up, but by the time it does, LR has already decided the NAS is offline and thus "missing". Before starting LR, used Finder to navigate among a few folders on the NAS to force it to wake up. Then start LR.
... View more
‎May 20, 2021
07:36 AM
Hi @jduchow , let's see if we can get this figured out.
First of all, Preset Syncing is available on Windows 10 machines, but not yet on Windows ARM machines. Are you on an ARM machine? We plan to enable it on ARM in a release later this summer.
You mention that you do in fact see the CCLibrary process running when you open Task Manager. If so, please open the Creative Cloud app and go to Help > About Creative Cloud. Scroll to the bottom - which version of CC Library does it say you are running?
Assuming that the CCLibrary process is up-to-date (3.12.11-1) and the process is running, I would expect that a relaunch of Photoshop should allow the Preset Sync checkbox to show up in Preferences > General.
... View more
‎Apr 02, 2021
02:21 PM
Thank You, after doing what you suggested, all appears to be working again. I shall try it more tomorrow Ian
... View more
‎Feb 20, 2021
05:16 PM
You could use the Eydropper tool, and set the second readout in the Info panel to Grayscale with a large sample size, like 31x31.
... View more
‎Jan 05, 2021
01:59 PM
Yeah i though you meant the body text, atleast i was thinking you meant that. The title bar normally is a bit harder to do. Since it also shows different on the 2 OS's, that makes it even worse. Th ewindows ScriptUI looks horrible man. I got a Windows machine since a couple weeks and im banging my head sometimes. Last time i worked with Windows was 17 years back, as if nothing changed, still looks like crap 😞 Well in your example code, i thought you coded that actaully, the title is also a variable. But titles cant be edit that much. With a regular dialog Photoshop Mac doesnt get titles i believe. thats why this custom dialog is nice. Concerning the Title, there isnt really much we cn do i believe. Its kinda crappy how everything looks in Windows so this fits right in 😉 hahaha no joke aside. I dont think we can make it centered like on OSX. EDIT tried find and see on page 79 Titles cant be changed. Im not sure what we can do on OSX though
... View more
‎Jul 02, 2020
07:13 PM
Impressive. Almost 2 years on, and NO IMPROVEMENT. Thanks Adobe Engineering, really appreciate all the 'new features' added to Photoshop, while the bugs remain. Print preview had no issues for years, maybe even a decade. Now its broken and nobody wants to fix it. Really feeling like I'm getting value for my $675 a year I now spend on CC.
... View more
‎Mar 12, 2020
10:42 AM
Does anyone know if you can check to see if a file axists using the CEP route. I am wanting to check the existance of a file in a sub folder of my HTML panel To get the path to the panel and subfolder I use var extensionRoot = csInterface.getSystemPath(SystemPath.EXTENSION) + "/spreadsheet/";
... View more
‎Mar 11, 2020
04:27 PM
The first code is missing a parenthesis. In what was before - too.
... View more
‎Feb 24, 2020
07:58 AM
I know that the Custom Curve Presets on the MAC are stored in ~/USERNAME/Library/Application Support/Adobe/Adobe Photoshop 2020/Presets/Curves but how does one navigate to that location from the Save Preset option because by default, the ~/USERNAME/Libray folder is hidden on the MAC. Ian
... View more
‎Feb 21, 2020
01:18 PM
1 Upvote
w.active = true;
I see this more commonly on the Mac, where a new window doesn't have focus.
... View more
‎Feb 09, 2020
10:37 AM
Hi @ian-barber,
maybe a bit awkward, but how about with something like that (depends on your layer structure and workflow)?
Canvas_Bigger ();
function Canvas_Bigger() {
var srcDoc = app.activeDocument;
var nme = srcDoc.layers[srcDoc.layers.length-1].name;
if (nme != "Big Canvas") {
// get original width and height
var w = srcDoc.width.value;
var h = srcDoc.height.value;
// Increase canvas size + 211 pixels to the right
// with the anchor in the top left
srcDoc.resizeCanvas(w /*+211*/, h, AnchorPosition.TOPLEFT);
srcDoc.layers[srcDoc.layers.length-1].name = "Big Canvas";
//alert ("Canvas was changed");
} else {
//alert ("Script was already used");
}
}
Rename (for example) your background layer in the first run and check for the name.
... View more
‎Feb 08, 2020
09:57 AM
1 Upvote
To process all layers names with DOM code you would need to use recursion. In that Process you could break when you find the first layer with the name or continue the process counting the number of layer or creating an array of layers with the name. A count of 0 = not found . The Action manage code is select layer Name. Which will select the layer with the name closest to the bottom of the layer stack. If there no such layer the Active layer would not be changed from what it was.
There are some differences between Action manager Layer kinds and DOM Layer Kind. For example all shape layers are fill layers but all fill layers are not shape layers. DOM has no Layer Kind Shape where Action Manager has a Shape kind. Many Scripts need to use some action manager code to script some thing Adobe DOM does not cover all of Photoshop features.
Here is a LayerStack.jsx that views layers from both kind of view don't try the script on a document with more the 20 layers.
// 2019, use it at your own risk;
//Action Manager layerKind seems to be like this.
var Doclayerkind = [
"Pixel",
"Adjustment",
"Text",
"Shape",
"Smartobject",
"6",
"Layerset",
"3Dlayer",
"Gradientfill",
"Patternfill",
"Colorfill",
"12",
"13",
"14",
"15",
"16",
"17",
"18",
"19",
"20",
"21",
"22",
"23",
"24"
]
var theLayers = collectLayers ();
alert("Layer Stack Height " + theLayers.length + "\n" + theLayers.join("\n") );
////// collect layers //////
function collectLayers () {
// the file;
var myDocument = app.activeDocument;
// get number of layers;
var ref = new ActionReference();
ref.putEnumerated( charIDToTypeID("Dcmn"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
var applicationDesc = executeActionGet(ref);
var theNumber = applicationDesc.getInteger(stringIDToTypeID("numberOfLayers"));
// process the layers;
var theLayers = new Array;
for (var m = 0; m <= theNumber; m++) {
try {
var ref = new ActionReference();
ref.putIndex( charIDToTypeID( "Lyr " ), m);
var layerDesc = executeActionGet(ref);
//alert(actionDescriptor(layerDesc));
//if (m==1) alert(actionDescriptor(layerDesc));
var layerSet = typeIDToStringID(layerDesc.getEnumerationValue(stringIDToTypeID("layerSection")));
var isBackground = layerDesc.getBoolean(stringIDToTypeID("background"));
// if group collect values;
//if (layerSet != "layerSectionEnd" && layerSet != "layerSectionStart" ) {
//if (layerSet != "layerSectionEnd" && layerSet != "layerSectionStart" && isBackground != true) {
var theName = layerDesc.getString(stringIDToTypeID('name'));
var theKind = layerDesc.getInteger(stringIDToTypeID('layerKind'));
var theID = layerDesc.getInteger(stringIDToTypeID('layerID'));
var theBounds = layerDesc.getObjectValue(stringIDToTypeID("bounds"));
var theseBounds = [theBounds.getUnitDoubleValue(stringIDToTypeID("left")), theBounds.getUnitDoubleValue(stringIDToTypeID("top")), theBounds.getUnitDoubleValue(stringIDToTypeID("right")), theBounds.getUnitDoubleValue(stringIDToTypeID("bottom"))];
layer = get_layer_by_id(theID);
var theBlend = layer.blendMode;
var theOpacity = layer.opacity;
var theVisible = layer.visible;
var theType = layer.typename;
var theParent = layer.parent;
if (layer!=null) {theRealkind = layer.kind;}
else {theRealkind = "";}
if (theRealkind==undefined) {theRealkind = "LayerKind.UNDEFINED"}
// Action Manager layerKnd Shape
//alert(Doclayerkind[theKind-1]);
if (Doclayerkind[theKind-1]=="Shape") {
//alert(actionDescriptor(layerDesc));
var theFill= layerDesc.getBoolean(stringIDToTypeID("fillEnabled"));
var theStrokewidth="";
var theStrokenabled=false;
try {
var theStrokewidth = layerDesc.getObjectValue(stringIDToTypeID("AGMStrokeStyleInfo")).getUnitDoubleValue(stringIDToTypeID("strokeStyleLineWidth"));
var theStrokenabled = layerDesc.getObjectValue(stringIDToTypeID("AGMStrokeStyleInfo")).getBoolean(stringIDToTypeID("strokeEnabled"));
}
//catch(e) {alert(e + ': on line ' + e.line, 'Script Error', true); }
catch(e) { }
theLayers.push([theName, "ID " + theID, Doclayerkind[theKind-1], theType, theParent, theBlend, "Opacity " + theOpacity, "Visible " + theVisible, "Bounds " + theseBounds, "stroke " + theStrokewidth + " " + theStrokenabled, "fill " + theFill, theRealkind]);
}
// Action Manager layerKind Adjustments
else if (Doclayerkind[theKind-1]=="Adjustment") {
//alert(actionDescriptor(layerDesc));
theLayers.push([theName, "ID " + theID, Doclayerkind[theKind-1], theType, theParent, theBlend, "Opacity " + theOpacity, "Visible " + theVisible, "Bounds " + theseBounds, theRealkind]);
}
// Action Manager layerKind Smartobjects
else if (Doclayerkind[theKind-1]=="Smartobject") {
//alert(actionDescriptor(layerDesc));
// get Smart Object info
//alert(obj_to_str(layer));
/*
alert(["allLocke " + layer.allLocked,
"\nblendMode " + layer.blendMode,
"\nbound " + layer.bounds,
"\nboundsNoEffect " + layer.boundsNoEffects,
"\nid " + layer.id,
"\nitemIndex " + layer.itemIndex,
"\nlinkedLayer " + layer.linkedLayers,
"\nname " + layer.name,
"\nopacity " + layer.opacity,
"\nparent " + layer.parent,
"\ntypename " + layer.typename,
"\nvisible " + layer.visible,
"\nxmpMetadata " + layer.xmpMetadata]);
*/
theLayers.push([theName, "ID " + theID, Doclayerkind[theKind-1], theType, theParent, theBlend, "Opacity " + theOpacity, "Visible " + theVisible, "Bounds " + theseBounds, theRealkind]);
}
// Action Manager layerKind Text
else if (Doclayerkind[theKind-1]=="Text") {
//alert(actionDescriptor(layerDesc));
// get text info
//alert(obj_to_str(layer));
/*
alert(["allLocke " + layer.allLocked,
"\nblendMode " + layer.blendMode,
"\nbound " + layer.bounds,
"\nboundsNoEffect " + layer.boundsNoEffects,
"\nid " + layer.id,
"\nitemIndex " + layer.itemIndex,
"\nlinkedLayer " + layer.linkedLayers,
"\nname " + layer.name,
"\nopacity " + layer.opacity,
"\nparent " + layer.parent,
"\ntypename " + layer.typename,
"\nvisible " + layer.visible,
"\nxmpMetadata " + layer.xmpMetadata,
"\nkind " + layer.kind,
"\ncolor " + layer.textItem.color,
"\ntextkind " + layer.textItem.kind,
"\nfont " + layer.textItem.font,
"\nblend " + layer.blendMode,
"\nantiAliasMethod " + layer.textItem.antiAliasMethod,
"\nsize " + layer.textItem.size,
"\nposition " + layer.textItem.position,
"\ncontents " + layer.textItem.contents,
]);
*/
theLayers.push([theName, "ID " + theID, Doclayerkind[theKind-1], theType, theParent, theBlend, "Opacity " + theOpacity, "Visible " + theVisible, "Bounds " + theseBounds, layer.textItem.font, layer.textItem.size, theRealkind ]);
}
// Action Manager layerKind Pixel
// Action Manager layerKind Layerset
// Action Manager layerKind Gradientfill
// Action Manager layerKind Patternfill
// Action Manager layerKind Colorfill
// Action Manager layerKind other
else {
//alert(theName + "," + Doclayerkind[theKind-1]);
//alert(actionDescriptor(layerDesc));
theLayers.push([theName, "ID " + theID, Doclayerkind[theKind-1], theType, theParent, theBlend, "Opacity " + theOpacity, "Visible " + theVisible, "Bounds " + theseBounds, theRealkind]);
}
//};
}
catch (e) {};
};
return theLayers
};
// DOM Layer items
function layerInfo(layer) {
alert("LayerName='" + layer.name + "'"
+ "\nLayerID='" + layer.id + "'"
+ "\nLayerKind='" + layer.kind + "'"
+ "\nallLocked='" + layer.allLocked + "'"
+ "\nblendMode='" + layer.blendMode + "'"
+ "\nbounds='" + layer.bounds + "'"
+ "\nboundsNoEffects='" + layer.boundsNoEffects + "'"
+ "\nitemIndex='" + layer.itemIndex + "'"
+ "\nlinkedLayers='" + layer.linkedLayers + "'"
+ "\nopacity='" + layer.opacity + "'"
+ "\nparent='" + layer.parent + "'"
+ "\ntypename='" + layer.typename + "'"
+ "\nvisible='" + layer.visible + "'"
+ "\nxmpMetadata='" + layer.xmpMetadata + "'"
);
}
// Thanks to SuperMerlin
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function actionDescriptor(desc){
if(desc.typename == 'ActionDescriptor'){
var c = desc.count;
var msg= "Action Descriptor Item Count = " + c;
for(var i=0;i<c;i++){ //enumerate descriptor's keys
//$.writeln('AD '+zeroPad( i+1, 2 )+' = '+IDTz(desc.getKey(i)) +' : '+desc.getType(desc.getKey(i)));
msg = msg + "\n" + 'AD '+zeroPad( i+1, 2 )+' = '+IDTz(desc.getKey(i)) +' : '+desc.getType(desc.getKey(i)) ;
}
return msg;
}
function IDTz(id){
try {
var res = typeIDToStringID( id );
if(res == '' ){
var res = typeIDToCharID( id );
}
}
catch(e){}
return res;
}
function zTID( s ){
if( s.length == 4 ) var res = charIDToTypeID( s );
if( s.length > 4 ) var res = stringIDToTypeID( s );
return res;
}
function zeroPad(num,pad) {
var z = Math.pow(10,Number(pad))
return num <= z ? ((Number( num) + z).toString().substr(1)): num
}
};
//Thanks to r-bin
function obj_to_str(obj){var str = ""; for (var p in obj) if(obj.hasOwnProperty(p))try{str+=p+"::"+obj[p]+"\n";}catch(e){};return str;}
// Thanks to
function get_layer_by_id(id, doc_id) {
try {
var doc;
if (doc_id == undefined) doc = activeDocument;
else {
for (var i = 0; i < documents.length; i++) {
if (documents[i].id == doc_id) {
doc = documents[i];
break;
}
}
}
if (doc == undefined) { alert("Bad document " + doc_id); return null; }
var r = new ActionReference();
r.putProperty(charIDToTypeID("Prpr"), stringIDToTypeID("json"));
if (doc_id == undefined) r.putEnumerated(charIDToTypeID("Dcmn"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt"));
else r.putIdentifier(charIDToTypeID("Dcmn"), doc_id);
eval("var json = " + executeActionGet(r).getString(stringIDToTypeID("json")));
if (json == undefined) return null;
var set = new Array();
function search_id(layers, id) {
for (var i = 0; i < layers.length; i++) {
if (layers[i].id == id) { set.push(i); return true; }
}
for (var i = 0; i < layers.length; i++) {
if (layers[i].layers) {
if (search_id(layers[i].layers, id)) { set.push(i); return true; }
}
}
}
if (search_id(json.layers, id)) {
var ret = doc.layers;
for (var i = set.length-1; i > 0; i--) { ret = ret[set[i]].layers;}
return ret[set[0]];
}
return null;
}
catch (e) { alert(e); }
}
... View more
‎Oct 11, 2019
02:07 PM
I found that even after disabling App Nap for ExtendScript Toolkit, the software would still hang. Looking at Activity Monitor I noticed that Illustrator (in my use case) was being set to nap while I was using developing in ESTK. macOS Mojave didn't give me the option to disable App Nap for Illustrator, so I tried disabling App Nap globally (see instructions here: https://www.lifewire.com/control-how-mac-applications-use-app-nap-2260788). After a system reboot I've not had any disruption yet - ESTK is running much more smoothly than before. Perhaps you could disalble App Nap for Photoshop or globally? Especially if ESTK is relying on an active connection with the Photoshop or other software during script development, as the other napping software may be impacting on ESTK performance.
... View more
‎May 08, 2019
08:00 AM
Scenario: In Photoshop.jsx, I place all my code for which I want photoshop to perform For example: I have a function that performs the zoom in and zoom out commands Zoom In: function zoomin(){ var d = new ActionDescriptor(); var r = new ActionReference(); r.putEnumerated(stringIDToTypeID("menuItemClass"), stringIDToTypeID("menuItemType"), stringIDToTypeID("zoomIn")); d.putReference(stringIDToTypeID("null"), r); executeAction(stringIDToTypeID("select"), d, DialogModes.NO); } Zoom Out: function zoomout(){ var d = new ActionDescriptor(); var r = new ActionReference(); r.putEnumerated(stringIDToTypeID("menuItemClass"), stringIDToTypeID("menuItemType"), stringIDToTypeID("zoomOut")); d.putReference(stringIDToTypeID("null"), r); executeAction(stringIDToTypeID("select"), d, DialogModes.NO); } HTML Form: On the index.html, I have 2 buttons each with its own id #btn_zoomin and #btn_zoomout Main.js In the Main.js file, I call the respective function in the photoshop.jsx file like this... //Zoom In $("#btn_zoomin").click(function () { csInterface.evalScript('zoomin()'); }); //Zoom Out $("#btn_zoomin").click(function () { csInterface.evalScript('zoomout()'); }); Question: I would like to replace the 2 buttons on the index.html to a single Toggle-Switch but how can I get the Toggle-Switch to call the function(s) in the Photoshop.jsx file. Any example code would be really appreciated. Ian
... View more
‎May 06, 2019
02:41 PM
Interesting, I never actually thought about that but you maybe right.
... View more