wckdtall
Enthusiast
wckdtall
Enthusiast
Activity
Mar 07, 2025
09:04 AM
Here's are the main specs on my system config, I don't want to post the entire thing into a public forum. I don't know which version of Photoshop this started in, I hadn't had to mask regularly, that's where if this wasn't how the featured was intended to be used let me know. My use case, I have an existing mask, I select an area of it with a marquee, and want to use "select and mask" to adjust the edges of only that area in place. Adobe Photoshop Version: 26.3.0 20250122.r.156 bfca642 x64
macOS: Sequoia 15.3.1
Model Name: MacBook Pro
Model Identifier: MacBookPro16,1
Processor Name: 8-Core Intel Core i9
Processor Speed: 2.3 GHz
Number of Processors: 1
Total Number of Cores: 8
L2 Cache (per Core): 256 KB
L3 Cache: 16 MB
Hyper-Threading Technology: Enabled
Memory: 32 GB
... View more
Mar 06, 2025
09:53 AM
I've noticed you're unable to select a marquee around an area of a mask, and "select and mask" only that portion. I think before the properties panel, you were able to do this, through refine mask? I did launch that dialog, but it doesn't composite the refined area over new area, it simply changes the selection. Select and mask is grayed out when there's a selection. Does this feature no longer exist? Did it ever? I tend to select portions of existing masks to revise based on clothing, or hair or skin, so I just want to focus on a portion at a time.
... View more
Mar 05, 2025
07:57 PM
That's the route I ended up going on indexOf, just reformatted it as a function. I do like the "shorthand" of it, but the errors it created simply weren't worth it.
... View more
Mar 05, 2025
04:01 PM
Thanks! I did find my doc is UTF-8, weird that it's not available during the save as, but more foolproof for accidentally nuking a file. I tried UTF-16 instead, and it doesn't support return characters the same way so I'm going to stick with "$.appEncoding". Scope wise, the document I have all these functions in, I treat as kind of an engine for various functionality(4500 lines) cross programs, so it's very possible that some glitch is happening to switch encoding throughout. As it stands in Extendscript adding things via prototype like indexOf, tends to break things.
... View more
Feb 11, 2025
08:51 PM
Thanks! I think I follow, so that the styles aren’t accidentally nuked? And potentially scope changes? I’m not usually manipulating text or styles with code.
... View more
Feb 11, 2025
07:38 PM
1 Upvote
Yep, there it works. Ultimately not what my script is doing. I needed it to check to make sure there's a copyright symbol on every page of the document, and return a count. I had already gone down the road of looping through the pages, the fromCharCode, was the piece I needed to resolve a bug.
... View more
Feb 11, 2025
04:28 PM
^2 is what InDesign’s find/change subs in as a “symbol” for copyright. Didn’t think it would work, but I worth a shot!
... View more
Feb 11, 2025
03:10 PM
This search came back, and I did extensive testing on scope as the functions I had trouble with aren't a problem on their own. Ultimately, what I discovered, was that searching for a "©" was incorrectly returning a -1, when .search was nested, with regex and as a string. InDesign character ^2 didn't work, but String.fromCharCode(169) did! //Revised Code below
function idLegalLineCount() {
var newAD = app.activeDocument;
//Set copyright symbol Character to a string. © Character itself will cause errors in certain situations.
var cRSym = String.fromCharCode(169);
var lgCnt = [];
//Loop through all the pages of the document
for (var y = 0; y < newAD.pages.length; y++) {
var aPg = newAD.pages[y];
var aFr = aPg.textFrames;
var aMF = aPg.masterPageItems;
var foundYou = false;
//Look through Page Text Frames
for (var x = 0; x < aFr.length; x++) {
var aPs = aFr[x].parentStory.contents;
// OLD METHOD Doesn't always work
//if (aPs.search(/©/gi) > -1) var foundYou = true; //alert((y + 1) + " - " + foundYou)
//search(cRSym) returns correct results
if (aPs.search(cRSym) > -1) var foundYou = true; //alert((y + 1) + " - " + foundYou)
}
}
//Look through Master Page Text Frames
for (var z = 0; z < aMF.length; z++) {
if (aMF[z].constructor.name != "TextFrame") continue;
var mPs = aMF[z].parentStory.contents;
// OLD METHOD Doesn't always work
//if (mPs.search(/©/gi) > -1) var foundYou = true; //alert((y + 1) + "- M - " + foundYou);
//search(cRSym) returns correct results
if (mPs.search(cRSym) > -1) var foundYou = true; //alert((y + 1) + "- M - " + foundYou)
}
}
if (foundYou == false) lgCnt.push(y + 1);
}
return lgCnt;
}
... View more
Jan 31, 2025
09:11 AM
Thanks! Looks like this documentation doesn't have an example with Illustrator's XMPString, your example is clear on how to handle. XMPString is the equivalent to xmpMetadata.rawData in photoshop. //Photoshop example
var xmp = new XMPMeta(app.activeDocument.xmpMetadata.rawData);
//Illustrator example
var xmp = new XMPMeta(app.activeDocument.XMPString); After the library is loaded, looks like all is needed to read the title directly is: var xmp = new XMPMeta(app.activeDocument.XMPString);
alert(xmp.getLocalizedText(XMPConst.NS_DC,"title", null, null));
... View more
Jan 30, 2025
11:16 PM
Thanks! Works like a charm! I don't know if I'd say it's easy, but I can't really wrap my mind around xmp, cause it always seems to be a diffrent formatted xml, and use different functions between all the programs. Is there a straight forward guide you've come across that explains it? I guess since most of extendscript is a single package, once it gets into different libraries, it's a stumbling block every time for me.
... View more
Jan 30, 2025
06:29 PM
Thanks! I'll give this regex a shot. Do you know if the xml markup is the same for all filetypes? Eps, pdf, ai etc? Are there any other functions built in to get/set properties? Love the idea of regex for this since I was just asking to read, just wondering if I'll need additional lookarounds. Like the idea of regex since I only have to read at this point,
... View more
Jan 30, 2025
02:21 PM
I'm trying to figure out how to read the XMP Title of a document, and compare it to the file name. I keep coming up empty on google, and their AI is recommending a function that doesn't exist as per usual. From what I'm seeing in the scripting documents, there is only: app.activeDocument.XMPString How do I just parse out the title? I keep getting results for Photoshop and InDesign, but those functions don't appear to cross over into Illustrator. <dc:title>
<rdf:Alt>
<rdf:li xml:lang="x-default">Untitled-2</rdf:li>
</rdf:Alt>
</dc:title>
... View more
Nov 04, 2024
12:02 PM
Thanks! Is it correct to assume, that all vector based portions of the graphic are scaled higher for output, and the raster items are scaled up or down only if the output resolution doesn't match? Below is a test with an image at 1000pixels within the document, vs the pixel dimensions of the document itself. Generally I think in the terms that if I have a 900dpi image, I can scale my graphic to 3x the size and it will be 300dpi. Looking at the relationship of physical size here is a bit confusing, as in photoshop dpi is relative to the physical pixels of the document itself, although I guess this would be similar to links or smart objects.
... View more
Nov 04, 2024
11:02 AM
Knowing Illustrator operates at 72ppi, I'm looking for clarification on how the resampling works when exporting higher resolution. If I have a 300ppi image inside a 72ppi document and export at 300dpi, is it resampling the image @ ~416%? Or is it 300dpi at the physical dimension of the artboard in inches? Mainly asking, as the pixel dimensions are 1000 pixels(AI and Bridge) @ 72dpi, vs exporting @ 300dpi it's 4167 pixels. The links panel looks like the dimensions match the 300dpi export, but just curious as the measurements are a bit confusing. Looks to me like the image is 300dpi based on the physical size of the document and not the pixel dimensions.
... View more
Oct 29, 2024
09:49 AM
Thanks @silk-m! Where I went wrong, was looking for actions by name, I forgot they are hexadecimal, and weren't searchable. To my future self, when I have the same problem next year, this is the path on mac: /Users/<USER_NAME>/Library/Preferences/Adobe Illustrator 28 Settings/en_US/Adobe Illustrator Prefs File: "Adobe Illustrator Prefs" Extension: None
... View more
Oct 25, 2024
02:03 PM
Agree they should be, but they are not. I tested with 2025 by creating a new action group and closing the program. It is nowhere to be found. They are not in: /Users/<>/Library/Application Support/Adobe/Adobe Illustrator 29 /Users/<>/Library/Preferences/Adobe Illustrator 29 Settings /Applications/Adobe Illustrator 2025/Presets.localized/en_US/Actions No Illustrator Folders here: /Library/Preferences /Library/Application Support/Adobe /Applications/Adobe Illustrator 2025/Adobe Illustrator.app/Contents
... View more
Oct 25, 2024
11:35 AM
Interesting. Most other presets like keys or workspaces get recorded, there has to be a temp file somewhere?
... View more
Oct 25, 2024
10:01 AM
Thanks! I tried that, and there's no presets folder in there. Neither Library has actions, really scratching my head to figure out where they are. Tried a "find aia" search in terminal, wondering if these "temp" actions are stored in a different format?
... View more
Oct 23, 2024
09:40 AM
Autoupgraded to 2025, and it uninstalled 2024. I tried importing settings, my user actions aren't available in 2025 there. I restored 2024 from time machine, and they are in there, but they're just "in the program", tried searching via terminal and didn't find anything. I can just save them out, but out of principle, I need to know where they are.
... View more
Aug 07, 2024
02:44 PM
In regard to the Overset Text issue, is the following a good solve? myobject.parentStory.textContainers[0].parentPage.documentOffset Object hierarchy is always confusing for me, but this worked with an overset text script I had, and with your mention of it, I've plugged into another similar doc that searches strings and gives a page number.
... View more
May 16, 2024
04:18 PM
That link is giving me a 404 error. I guess what I'm asking, is how do I batch replace footage in one timeline with another sequence or format and retain the edits? The methods I tried reset the time codes to zero.
... View more
May 08, 2024
07:50 AM
@Kevin-Monahan I'm running into the same issue. I realized I edited brightness contrast into each part of ONE clip(mov) in my timeline, and want to be able to globally adjust, so I created a sequence from that clip. Basically trying to get it to perform like comps in After Effects. I've tried changing the name within finder in hopes of relinking to different media. I also tried replace with clip from bin, which doesn't remember where my edit was. Timecodes match and they're the same clip. Trying to use the feature similarly to dragging and dropping a comp in After Effects onto an existing edit in the timeline. I'm working within one pproj file.
... View more
Mar 26, 2024
08:49 AM
1 Upvote
Solution on Mac: try{
app.system("afplay /System/Library/Sounds/Glass.aiff")
}catch(e){
};
... View more
Mar 25, 2024
06:23 AM
I'm just trying to understand how to obtain some of these more obscure items on my own. It can help to understand how to edit code and what it is doing. I don't generally like AM, because it's not intuitive to use, but we're forced to since it has more functionality. AM and Extendscript can be a mystery, even with the documentation people have created. Doesn't seem like there's a way to obtain it with scripting listener, forums are always a great help though.
... View more
Mar 24, 2024
09:44 AM
What do you mean by »record« exactly? Record/log through scripting listener. Sorry, I meant to specify that. I'm trying to understand how you'd find that through AM, if undocumented and not logged/recorded. It seems to only be informational, so photoshop doesn't find it necessary to place in an AM script.
... View more
Mar 23, 2024
08:57 AM
1 Upvote
Thanks for the solve! Out of curiosity, are you able to record "smartObjectMore" with scripting listener? Just wondering where this info is stored and how it was found.
... View more
Feb 23, 2024
06:44 PM
1 Upvote
So simple, match and using one stored string makes a lot of sense since I'm just looking for duplicates, and it's still being very specific what to look for on creation. My mind always jumps to non existent extendscript functions like in_array, but this accomplishes the same with the tools given. Thanks!
... View more
Feb 23, 2024
09:52 AM
Thanks! I wanted to see if I could do it with AM, but I'm not sure how to create a function that would return a true false for existing guides.
... View more
Feb 21, 2024
02:25 PM
2 Upvotes
I created a script that creates guides in the current document, the problem was if you don't check to see if they exist first, it'll keep making the same guide over and over again. Was trying to use switch cases, for logic on horizontal vs vertical, and may have gotten a bit too verbose, looping through multiple arrays. Is there a more straight forward way to accomplish checking the document for guides and creating if they don't exist? function psGuideCheck(guideToCheck, gDir) {
var aDG = app.activeDocument.guides;
var gResult = false;
if (aDG.length > 0) {
for (var i = 0; i < aDG.length; i++) {
if (guideToCheck == Math.round(aDG[i].coordinate.as('px')) && gDir == aDG[i].direction) {
var gResult = true;
break;
}
}
}
return gResult;
}
function psCreateGuides(cropLeft, cropTop, cropRight, cropBottom) {
var actDocG = app.activeDocument.guides;
var yLoc = [Math.round(cropTop), Math.round(cropBottom)];
var xLoc = [Math.round(cropLeft), Math.round(cropRight)];
var yDir = Direction.HORIZONTAL;
var xDir = Direction.VERTICAL;
//Loop Through Horizontal guides
for (var i = 0; i < yLoc.length; i++) {
var yPxGd = UnitValue(yLoc[i], "px").as('px'); //converts to the right value, and removes " px" from the end
if (psGuideCheck(yPxGd,yDir) == false) actDocG.add(yDir, UnitValue(yLoc[i], "px"));
}
//Loop Through Vertical Guides
for (var i = 0; i < xLoc.length; i++) {
var xPxGd = UnitValue(xLoc[i], "px").as('px'); //converts to the right value, and removes " px" from the end
if (psGuideCheck(xPxGd,xDir) == false) actDocG.add(xDir, UnitValue(xLoc[i], "px"));
}
}
psCreateGuides(-75, -75, 75, 75);
... View more
Jan 09, 2024
08:38 AM
Sorry for any confusion, I'm just asking if there is a more direct way to get link statuses for smart objects within a script and then run a function based on that. In Indesign, there are 5 statuses LinkStatus.LINK_MISSING, LinkStatus.LINK_OUT_OF_DATE, LinkStatus.LINK_INACCESSIBLE, LinkStatus.LINK_EMBEDDED, and LinkStatus.NORMAL. I was asking to see if there is a photoshop equivalent. I have yet to review the link you sent, though I did see the stack overflow link in there as well. Thanks again.
... View more