Sergey Osokin
Enthusiast
Sergey Osokin
Enthusiast
Activity
Feb 13, 2025
10:12 AM
2 Upvotes
It seems to have appeared in 29.3. In 29.2, the bug does not occur, but works as a standard ungroup.
... View more
Feb 13, 2025
12:38 AM
1 Upvote
Hmm. Mac OS, Illustrator v29.2.1 app.executeMenuCommand('ungroup all') not working. It only works as an current “ungroup” command.
... View more
Feb 03, 2025
08:31 PM
Have you considered such a solution? If the paths are the same, their order in layers has not changed: 5 objects were selected, next time the same 5 objects will be selected. Then you can store an array of object data: index or unique name in the document of each path (even easier), indexes of points of each path that need to be selected again. Maybe you don't need to store X, Y coordinates here.
... View more
Feb 03, 2025
08:25 PM
Scripts can perform warping from the Effect > Warp menu. Or scripts can move anchor points and their handles on tracks. You can invoke the Envelope Warp command on selected objects. However, deformation like in Puppet Warp is not available. It would be nice to attach screenshots of before/after examples of the deformation you want to automate.
... View more
Feb 03, 2025
09:05 AM
What exactly do you mean by "puppet warp script"? What features are you looking for?
... View more
Feb 03, 2025
09:01 AM
What does this mean? A function should loop through all pathItems in the document and their anchor points, check the coordinates of each anchor point against the array, and select the anchor if a match is found? Or should the user select a pathItem and the function check if the anchor points match the coordinates from the array and leave only the matching anchor points selected? Adobe Illustrator can also have fractional coordinates that differ by a small amount. For example, if two points match, but one has a coordinate of X: 123.000 and the other has a coordinate of X: 122.999.
... View more
Feb 02, 2025
10:55 PM
If we check that a point on the path is selected, we don't need the index separately to get its anchor coordinates immediately. (function () {
var selectedPoints = [];
for (var i = 0; i < app.selection.length; i++) {
var item = app.selection[i];
if (item.typename === "PathItem" && item.hasOwnProperty("pathPoints")) {
for (var j = 0; j < item.pathPoints.length; j++) {
var currPoint = item.pathPoints[j];
// Check if the pathPoint is selected
if (currPoint.selected === PathPointSelection.ANCHORPOINT) {
selectedPoints.push({
x: currPoint.anchor[0],
y: currPoint.anchor[1]
});
}
}
}
}
})();
... View more
Jan 29, 2025
07:32 PM
3 Upvotes
As far as I can see from your EPS, if this is indeed the case, the texts in it are not made up of individual letters, but are a "Type on Path" object. In this case, you should mass detach the editable text from the vector path. There is an old script by Nathaniel Vaughn KELSO "Detatch Text from Path", I modified it a bit for your case // Based on Detatch Text from Path by Nathaniel Vaughn KELSO
(function () {
if (!documents.length) return;
var sel = app.selection;
if (!sel.length || sel.typename === "TextRange") return;
for (i = sel.length - 1; i >= 0; i--)
if (sel[i].typename === "TextFrame" && sel[i].kind === TextType.PATHTEXT) {
var currTF = sel[i];
var newTF = currTF.parent.textFrames.add();
for (j = 0; j < currTF.lines.length; j++) {
var frame = currTF.lines[j];
if (j > 0) newTF.paragraphs.add("");
frame.duplicate(newTF);
}
currTF = currTF.createOutline();
newTF.top = currTF.top;
newTF.left = currTF.left;
currTF.remove();
newTF.selected = true;
}
})();
... View more
Jan 27, 2025
08:42 PM
There is a tag xmpTPg:PlateNames in the XMP data of a vector file. As far as I have checked several files, it only stores data about the spot colors used in the file, not all of them from the Swatches panel. Check out the script here. It extracts the used spot colors from the XMP data of files in the folder into a txt file https://community.adobe.com/t5/illustrator-discussions/looking-to-silence-alerts-while-processing-files/m-p/14293923#M390604
... View more
Jan 27, 2025
08:05 PM
1 Upvote
Released a new script ShowObjectNames, which got a dialog with custom caption placement and support for the names of any selected objects. addLinkedFileNames.jsx is deprecated
... View more
Jan 19, 2025
08:28 PM
If we create sublayers manually, they are not collapsed either. And this cannot be adjusted by any option. Therefore, scripts don't have access to collapse the layer tree either.
... View more
Jan 19, 2025
08:08 PM
2 Upvotes
I checked the pdf documents ADOBE ILLUSTRATOR SCRIPTING REFERENCE: JAVASCRIPT and only the latest versions 2023, 2024, 2025 contain information about getViewMode()
... View more
Jan 19, 2025
07:51 PM
Is your image in a group? Ungroup it and try the script. Experiment with the bleed size. I have tested and the script does not work correctly if the image is in a group or if I enter large numbers.
... View more
Jan 17, 2025
05:21 AM
The v29.2 object model doesn't seem to have changed much from previous releases. I also note that the WebP format is not available for ExtendScript either. I wrote about this in the Adobe Illustrator Prerelease Slack, although the problems of script authors are not taken into account 🙂
... View more
Jan 17, 2025
03:59 AM
Do you manually select the circles before running the script? Because it's easier than having the script analyze every shape in the document to see if it's a circle. What crosshair settings are preferred? You may need some stroke color, stroke weight, line length (pixels, millimeters, or other units).
... View more
Jan 17, 2025
03:51 AM
3 Upvotes
If your text frames will be the topmost objects on the artboard, you can use the RenameArtboardAsTopObj script.
... View more
Jan 15, 2025
08:21 PM
1 Upvote
Oh, I've been using a temporary path inside CompoundPathItem for a long time when it's created from groups. But there are scripts where this solution is not ideal either. For example, we need to change the color of a compound path from groups. 1) We add a temporary path to it, 2) Assign a new color and see how the color of the whole CompoundPathItem has changed 3) We remove the temporary path. Later, when we manually release the CompoundPathItem, the color of the groups in it will be the old one 😞 I always hope that users will have this as a rare case and not need to release the compound path. However, to change the color of a compound path, we have to change the color of each PathItem within it. That's in an ideal world, but we live in Adobe's world.
... View more
Dec 25, 2024
04:02 AM
On PC it is possible to create a VBS file and run it while the JS script is running. For Mac OS, this solution does not work.
... View more
Dec 25, 2024
02:23 AM
1 Upvote
If you have Windows OS (PC), you can add a piece of VisualBasic code to the JS script that will simulate a keystroke to change the units in the document setup to pixels.
... View more
Dec 25, 2024
02:13 AM
1 Upvote
In Illustrator, you can't run a script from an action that itself calls another action. Illustrator cannot handle such processes and will freeze. It may be possible in ExtendScript to write an export of assets without using an action? All I see in your action is a Hide Others command for layers. And no other specific commands. But this can be done in a loop through the layer[idx].visible property. If you really need to hotkey a script, use third-party utilities AutoHotkey (Win), KeyboardMaestro (Mac), and these are not all possible utilities
... View more
Dec 23, 2024
05:10 AM
As I see it, the color of compound paths is handled by the script. Maybe you can show an example with a screenshot for clarification? Admit it, isn't this a ChatGPT script? Because some of the code doesn't exist in Adobe's ExtendScript language, which indicates that AI was used to write the code. // It's a fantasy code
} else if (item.typename === "ClippingMaskItem") {
for (var k = 0; k < item.clippedItems.length; k++) {
if (item.clippedItems[k].fillColor) {
var newSpotColor = createSpotColor(item.clippedItems[k].fillColor);
processPageItem(item.clippedItems[k], newSpotColor);
}
}
}
... View more
Dec 23, 2024
04:56 AM
In each version of Illustrator, 3-4 Adobe scripts are included by default in the Presets > <locale> > Scripts folder. All other scripts are created by the community, and you will need to download manually and install them.
... View more
Nov 29, 2024
04:50 AM
1 Upvote
Maybe it's the same problem I noticed with script, where a lot of elements are generated vertically. This was in June of this year on different versions of Illustrator. I tested on a 27" iMac and a 15" Macbook to see the pattern. If you run the same script on a small monitor, some elements just don't generate visually, and the scrollbar doesn't help, it scrolls down the cropped version of the panel. At the same time, there is access to the "lost" red elements in the code, they exist. Somehow the ScriptUI dialog checks the user's screen size and just doesn't output some of the elements that don't fit into some vertical screen boundary.
... View more
Nov 20, 2024
02:42 AM
Describe your system information. macOS Monterey + Illustrator v29.0.1 have no problems installing this script or running it via Other Script.
... View more
Nov 19, 2024
12:39 AM
3 Upvotes
The fictional ChatGPT: options.DecimalPlaces > options.coordinatePrecision options.Minify > options.svgMinify options.Responsive > options.svgResponsive
... View more
Nov 16, 2024
07:24 AM
I have no problem in the panel with highlighting returning to layer doc.activeLayer = newLayer. What is your operating system and version of Illustrator? Or maybe show more of a piece of script code.
... View more
Nov 09, 2024
04:20 AM
ExtendScript does not have a method to select layer appearance.
... View more
Nov 08, 2024
08:35 PM
Yes, I was thinking about this case tonight. Now the script can transfer only layer contents via confirmation dialog. https://gist.github.com/creold/6ae88e09836400e43a472db4c0973576
... View more
Nov 07, 2024
07:41 PM
1 Upvote
New layers with sublayers are created on top of other layers. // Script to merge layers that have the same name into sublayers
// https://community.adobe.com/t5/illustrator-discussions/script-to-merge-layers-that-have-the-same-name-into-sublayers/td-p/14968548
function main() {
if (!documents.length) return;
var doc = app.activeDocument;
var layerGroups = collectSameLayers(doc);
moveLayersToNew(doc, layerGroups);
}
// Collect layers with the same name
function collectSameLayers(doc) {
var layerGroups = [];
for (var i = 0; i < doc.layers.length; i++) {
var currLayer = doc.layers[i];
var currName = currLayer.name;
var isFound = false;
for (var j = 0; j < layerGroups.length; j++) {
if (layerGroups[j].name === currName) {
layerGroups[j].layers.push(currLayer);
isFound = true;
break;
}
}
if (!isFound) {
layerGroups.push({
name: currName,
layers: [currLayer]
});
}
}
return layerGroups;
}
// Create new layer and move inside original layers
function moveLayersToNew(doc, layerGroups) {
for (var i = layerGroups.length - 1; i >= 0; i--) {
var currGroup = layerGroups[i];
// Only process if there are multiple layers with the same name
if (currGroup.layers.length > 1) {
var newLayer = doc.layers.add();
newLayer.name = currGroup.name;
for (var j = currGroup.layers.length - 1; j >= 0; j--) {
currGroup.layers[j].move(newLayer, ElementPlacement.INSIDE);
}
}
}
}
try {
main();
} catch (e) {}
... View more
Nov 03, 2024
08:58 PM
ChatGPT's typos are easy to find in this code, so they are fairly easy to fix. I found all the typos yesterday. Most of the code ChatGPT wrote will work. However, Adobe does not provide access to the Document Setup. Writing VBScript (PC only) to change the document setup is no fun.
... View more