CarlosCanto
Community Expert
CarlosCanto
Community Expert
Activity
‎Jan 29, 2025
09:05 PM
@enisio1 I edited the topic title to try make it a bit clearer
... View more
‎Jan 28, 2025
08:44 AM
1 Upvote
try this pattern
/^TEST(?=\s)/
... View more
‎Jan 11, 2025
01:10 PM
your for loop is missing a closing bracket
... View more
‎Jan 10, 2025
01:52 PM
2 Upvotes
if then would not work here because if the swatch does not exist, it will raise an error. So we need to use try-catch to direct the script to do something else when the swatch is not found
var idoc = app.activeDocument;
var swatches = idoc.swatches;
try {
var mySwatch = swatches.getByName("CMYK Yellow");
alert ("swatch found");
}
catch (e) {
alert ("swatch not found")
}
... View more
‎Jan 07, 2025
09:10 AM
@alhan alberto_mazon m0922 perfecto! Gracias por reportar, esto ayuda a otros usuarios
... View more
‎Jan 05, 2025
09:40 PM
1 Upvote
add this line at the end of your script
:
:
// Adjust the position of the new group to the bottom of the original object
group.position = [minX, maxY - (groupBounds[1] - groupBounds[3])];
doc.selection = [group];
BridgeTalk.bringToFront("illustrator");
}
... View more
‎Jan 03, 2025
06:56 PM
Illustrator no esta disponible en el sistema operativo Androide, asi que cualquier aparato con ese sistema no sera capaz de usar illustrator por el momento. Tal vez en el futuro este disponible.
Por ahora podrias usar Illustrator On The Web en tu Tableta y corre en el Browser, esta en Beta. Mas informacion aqui
https://helpx.adobe.com/illustrator/web/get-set-up/learn-the-basics/overview.html
... View more
‎Jan 02, 2025
09:11 AM
yeah please share for everyone's benefit if you can
... View more
‎Jan 02, 2025
08:52 AM
1 Upvote
hmm I don't know what's happening, indeed it didn't download in Chrome when I clicked on the link, but right clicking and using "Saving link As..." works well
... View more
‎Jan 01, 2025
01:49 PM
it's this one Ton
https://aiscripts.com/illustrator-text-block/
Answering the OP
you have to install the scripts to get them listed in the Scripts Menu
... View more
‎Dec 27, 2024
12:23 PM
Native Scripts are under File Menu, also there's no Triangle Script. If you used it before then it was probably added by a third party plugin
... View more
‎Dec 05, 2024
09:58 PM
Hi Mark, for real? I did not know that 😕
I did what you mentioned and the script works the same, but fruits.toSource() came up empty, but the rest worked as expected
... View more
‎Dec 05, 2024
09:11 PM
now if it is imperative to have an Array I'll give it another try.
... View more
‎Dec 05, 2024
09:06 PM
here's a sample
// map pathItems to json 12/5/24
// https://community.adobe.com/t5/illustrator-discussions/how-to-add-a-header-child-to-array/m-p/15022564#M429214
function main() {
var idoc = app.activeDocument;
var pItems = idoc.pathItems;
var fruits = {};
var pname;
for (var b=0; b<pItems.length; b++) {
pname = pItems[b].name;
// if key does not exist, create one and initialize it with an empty array
if (!fruits[pname]) {
fruits[pname] = [];
}
fruits[pname].push(pname);
}
//alert(fruits.toSource());
//alert(fruits["orange"].toSource());
// then to consume the data
alert("There are: " + fruits["orange"].length + " Oranges");
}
main();
... View more
‎Dec 05, 2024
08:36 PM
it might be possible to make an array but the way you described it, an Object might be easier to consume after it has been made instead of an Array
fruits = {
lemon: [lemon, lemon, lemon],
orange: [orange, orange],
peach: [peach, peach, peach]
}
... View more
‎Nov 29, 2024
10:59 PM
The *star* indicates that you have updated the Data in the Data Set manually. Once you Capture (save) each data set you don't suppose to make any other changes. You should only cycle trhough the Data Sets.
If you make changes after capturing a data set, the "star" will show up to remind you that you need to Update the existing Data Set or to create a new Set
... View more
‎Nov 29, 2024
10:37 PM
2 Upvotes
13 years later and still rocking @Ton Frederiks
... View more
‎Nov 20, 2024
10:56 PM
can you share sample files or create a mock up file to share?
Is your coworker teaching you but "not really"? I mean, if they're skipping a step or two, share what you remember and we'll try fill in the blanks.
Other than that, perhaps they're using a script to set up hundreds of files in no time
... View more
‎Nov 20, 2024
08:10 AM
it's hard to tell when the Action is already stringyfied.
to have a better idea of the process, record an action with one or two steps, export, then open it with a text editor.
As you can see in this example, it's indented, it's easier to see when each block starts and ends
... View more
‎Nov 18, 2024
10:56 AM
1 Upvote
instead of copying the Artboard dimensions, try using a document Preset where you can supply some of the properties before creating the document
var sourceDoc = app.activeDocument;
var docPreset = new DocumentPreset;
docPreset.width = sourceDoc.width;
docPreset.height = sourceDoc.height;
docPreset.units = RulerUnits.Points;
docPreset.colorMode = DocumentColorSpace.RGB;
var newDoc = app.documents.addDocument("Web", docPreset);
... View more
‎Nov 18, 2024
09:51 AM
1 Upvote
at first glance, the problem seems to be ChatGPT, it comes up with properties that do not exist in Illustrator Scripting.
... View more
‎Nov 14, 2024
08:59 AM
it seems you're trying to record an Action, is that right? not writing a script in Javascript?
... View more
‎Nov 14, 2024
08:56 AM
I haven't tried it yet but this script looks great Mark!
... View more
‎Nov 12, 2024
08:53 PM
the most you could do is group your actions which I guess you already do.
as for scripts, I think you can also organize your scripts in folders, which would serve as menus in the File->Scripts section
would that work for you?
... View more
‎Nov 12, 2024
08:50 PM
are you ok using Auto Hot Key? you could send click commands to a specific screen x,y coordinates, assuming the location of the play button is fixed.
... View more
‎Nov 12, 2024
08:46 PM
it's hard to tell, can you post a script and some files to test? preferably provide something we can reproduce
... View more
‎Nov 11, 2024
11:45 AM
here you go, I added setting a dataset to my previous script
// cycle through DataSet variables
// https://community.adobe.com/t5/illustrator-discussions/script-access-to-variables-and-datasets/m-p/14971636#M426387
var idoc = app.activeDocument;
var vars = idoc.variables;
for (a=0; a<idoc.dataSets.length; a++) {
idoc.activeDataSet = idoc.dataSets[a];
for (j=0; j<vars.length; j++) {
//$.writeln(vars[j].name + ' : ' + vars[j].pageItems[0].contents);
alert(vars[j].name + ' : ' + vars[j].pageItems[0].contents);
}
}
... View more
‎Nov 07, 2024
08:15 AM
I haven't seen a script for that, can you post screnshots showing more details of what you need? or better yet can you share sample files?
... View more
‎Nov 07, 2024
08:12 AM
@BELECH2022 I didn't think about that when I wrote the script, I'll add that functionality when I have a chance
thanks
... View more