OVERLAP OBJECTS
Toggling Create sub-folders in Export for Screens from a script
I have a fairly complex script that exports different things from an Illustrator document. I am using document.exportForScreens to easily export all artboards at once. However, I can't find a way to turn off Create sub-folders in the script. Is that possible?
illustrator script to rename artboard to specific name
I'm looking for a script that would allow me to rename illustrator artboard to specific name. Those would always be the same 3 names in the same order (CV, UC and GE).
When I create my Illustrator doc I always have 3 artboards, those tree artboard need to be rename to:
artboard 1 to CV
artboard 2 to UC
artboard 3 to GE
I recently discovered the power of illustrator script. I really need the learn how to make my own..
Thanks in advance
Yolaine
[CC2018] Text stretched when resizing text frame using width property
Hi,
When resizing a text frame using Applescript, modifying the width property, not only the text frame size changes, but the text is stretched.
Does anyone know how I can prevent this from happening ?
tell application "Adobe Illustrator" set myDoc to the current document tell myDoc set myFrame to page item "test" set the width of myFrame to 300 set book to false end tell endtell
Any Suggestions ?
Thanks
check selected item is Rectangle
Hi,
how to check the selected item is rectangle in illustrator using script.
Thank You.
UI button programming
I'm trying to grab a number from the user, default of 1, with buttons next to it that increase or decrease that number
I don't believe I'm even close yet, the number displayed in the UI doesn't change here, also, I'm not sure it's even a number, but text instead. I'm still very new at this, everything is probably pretty crude.
w = new Window('dialog', "Gadget");
w.grp1 = w.add('group');
w.grp1.orientation = "row";
w.grp1.alignment = "right";
w.grp1.add("statictext", undefined, "Left Offset:");
var leftoffset = w.grp1.add("edittext", undefined, 1);
leftoffset.characters = 3;
leftoffset.active = true;
var grp1up = w.grp1.add("button", undefined, "+");
grp1up.onClick = leftoffset = leftoffset + 1;
var grp1down = w.grp1.add("button", undefined, "-");
grp1up.onClick = leftoffset = leftoffset - 1;
Another later goal is to have a checkbox in the UI near the beginning, that allows the button presses to increase the numbers by 0.25's instead of 1's
A list of Illustrator menu commands we can call from JavaScript.
app.executeMenuCommand(StringFromListBelow);
actualsize
Add Anchor Points2
AddArrowHeads2
Adjust Colors Dialog
Adjust3
Adobe Action Palette
Adobe Actions Batch
Adobe AI Device center
Adobe AI Save For Web
Adobe Apply Last Effect
Adobe Art Style Plugin Other libraries menu item
Adobe Bridge Browse
Adobe BrushManager Menu Item
Adobe Color Palette
Adobe Color Palette Secondary
Adobe Default Workspace
Adobe Flattening Preview
Adobe Gradient Palette
Adobe Harmony Palette
Adobe Illustrator Find Font Menu Item
Adobe Illustrator Smart Punctuation Menu Item
Adobe Last Effect
Adobe LinkPalette Menu Item
Adobe Manage Workspace
Adobe Minimal Workspace
Adobe New Fill Shortcut
Adobe New Stroke Shortcut
Adobe New Style Shortcut
Adobe New Swatch Shortcut Menu
Adobe New Symbol Shortcut
Adobe Optical Alignment Item
Adobe Paragraph Styles Palette
Adobe Save a Version
Adobe Save Workspace
Adobe Stroke Palette
Adobe Style Palette
Adobe SVG Interactivity Palette
Adobe Swatches Menu Item
Adobe Symbol Palette
Adobe Symbol Palette Plugin Other libraries menu item
Adobe Transparency Palette Menu Item
Adobe Update Link Shortcut
Adobe Variables Palette Menu Item
AdobeAlignObjects2
AdobeBrushMgr Other libraries menu item
AdobeBuiltInToolbox1
AdobeCheatSheetMenu
AdobeLayerPalette1
AdobeLayerPalette2
AdobeLayerPalette3
AdobeNavigator1
AdobeNavigator2
AdobePathfinderPalette1
AdobeSwatch_ Other libraries menu item
AdobeTransformObjects1
AI Bounding Box Toggle
AI Magic Wand
AI Object Mosaic Plug-in3
AI Place
AI Reset Bounding Box
ai_browse_for_script
AISlice Clip to Artboard
AISlice Combine
AISlice Create from Guides
AISlice Create from Selection
AISlice Delete All Slices
AISlice Divide
AISlice Duplicate
AISlice Feedback Menu
AISlice Lock Menu
AISlice Make Slice
AISlice Release Slice
AISlice Slice Options
alternate glyph palette plugin
alternate glyph palette plugin 2
Appearance of Black 1
Apply Last Filter
areatextoptions
arrangeicon
artboard
assignprofile
average
avgAndJoin
bringAllToFront
Brush Strokes menu item
cascade
centerAlign
Character Styles
Check Spelling
cleanup menu item
clear
clearguide
clearTrack
clearTypeScale
Clipping Masks menu item
close
closeAll
color
Colors3
Colors4
Colors5
Colors6
Colors7
Colors8
Colors9
compoundPath
control palette plugin
convertlegacyText
convertlegacyText1
convertlegacyText2
convertlegacyText3
convertlegacyText4
copy
Create Envelope Grid
cut
Define Pattern Menu Item
deselectall
discretHyphen
Distort2
doc-color-cmyk
doc-color-rgb
DocInfo1
document
DropShadow2
Dynamic Text
edge
Edit Custom Dictionary...
Edit Envelope Contents
editGraphData
editMask
EditOriginal Menu Item
editview
enterFocus
Envelope Options
exitFocus
Expand as Viewed
Expand Envelope
Expand Planet X
Expand Tracing
Expand3
expandStyle
export
faceSizeDown
faceSizeUp
File Handling & Clipboard 1
File Info
Find and Replace
Find Blending Mode menu item
Find Fill & Stroke menu item
Find Fill Color menu item
Find Link Block Series menu item
Find Next
Find Opacity menu item
Find Reselect menu item
Find Stroke Color menu item
Find Stroke Weight menu item
Find Style menu item
Find Symbol Instance menu item
fitall
fitHeadline
fitin
Flash Text
FlattenTransparency1
Gradient Feedback
graphDesigns
group
guidegridPref
helpcontent
hide
hide2
hideApp
hideOthers
highlightFont
highlightFont2
hyphenPref
ink
Input Text
internal palettes posing as plug-in menus-attributes
internal palettes posing as plug-in menus-character
internal palettes posing as plug-in menus-info
internal palettes posing as plug-in menus-opentype
internal palettes posing as plug-in menus-paragraph
internal palettes posing as plug-in menus-tab
Inverse menu item
join
justify
justifyAll
justifyCenter
justifyRight
KBSC Menu Item
keyboardPref
Knife Tool2
Last Filter
leftAlign
Live 3DExtrude
Live 3DRevolve
Live 3DRotate
Live AddArrowHeads2
Live Color Dialog
Live Deform Arc
Live Deform Arc Lower
Live Deform Arc Upper
Live Deform Arch
Live Deform Bulge
Live Deform Fish
Live Deform Fisheye
Live Deform Flag
Live Deform Inflate
Live Deform Rise
Live Deform Shell Lower
Live Deform Shell Upper
Live Deform Squeeze
Live Deform Twist
Live Deform Wave
Live DropShadow2
Live Ellipse
Live Feather
Live Free Distort
Live Inner Glow
Live Offset Path
Live Outer Glow
Live Outline Object
Live Outline Stroke
Live Pathfinder Add
Live Pathfinder Crop
Live Pathfinder Divide
Live Pathfinder Exclude
Live Pathfinder Hard Mix
Live Pathfinder Intersect
Live Pathfinder Merge
Live Pathfinder Minus Back
Live Pathfinder Outline
Live Pathfinder Soft Mix
Live Pathfinder Subtract
Live Pathfinder Trap
Live Pathfinder Trim
Live Pucker & Bloat
Live Rasterize
Live Rasterize Effect Setting
Live Rectangle
Live Roughen
Live Round3
Live Rounded Rectangle
Live Scribble and Tweak
Live Scribble Fill
Live Transform
Live Twist
Live Zig Zag
lock
lock2
lockguide
LowerCase Change Case Item
Make and Convert to Live Paint
Make and Expand
Make Envelope
make mesh
Make Planet X
Make Text Wrap
Make Tracing
Make Warp
makeguide
makeMask
Marge Planet X
minimizeWindow
navigateToNextDocument
navigateToNextDocumentGroup
navigateToPreviousDocument
navigateToPreviousDocumentGroup
new
newFromTemplate
newview
newwindow
noCompoundPath
OffsetPath2
OffsetPath3
open
outline
Overprint2
pagetiling
Paint Tracing
paste
pasteBack
pasteFront
pasteInAllArtboard
pasteInPlace
PathBlend Expand
PathBlend Make
PathBlend Options
PathBlendRelease
PathBlend Replace Spine
PathBlend Reverse Spine
PathBlend Reverse Stack
PDF Presets
Planet X Options
pluginPref
preference
preview
Print Presets
proofColors
proof-custom
proof-document
proof-mac-rgb
proof-monitor-rgb
proof-win-rgb
Punk2
quit
raster
Rasterize 8 menu item
redo
Registration...
Release Envelope
Release Planet X
Release Text Wrap
Release Tracing
releaseCropMarks
releaseguide
releaseMask
releaseThreadedTextSelection
Remove Anchor Points menu
removeThreading
repeatPathfinder
Replace Colors Dialog
revert
rightAlign
Roughen3
Round3
Rows and Columns....
ruler
rulerCoordinateSystem
Saturate3
save
Save for Office
saveacopy
saveas
saveasTemplate
Scribble3
selectall
selectallinartboard
Selection Hat 1
Selection Hat 10
Selection Hat 11
Selection Hat 2
Selection Hat 3
Selection Hat 4
Selection Hat 5
Selection Hat 6
Selection Hat 7
Selection Hat 8
Selection Hat 9
selectionPref
sendBackward
sendForward
sendToBack
sendToFront
Sentence case Change Case Item
setBarDesign
setCropMarks
setGraphStyle
setIconDesign
Show Gaps Planet X
Show Perspective Grid
Show Preprocessed Image
showAll
showAllWindows
ShowArtwork
showgrid
showguide
showHiddenChar
ShowNoArtwork
ShowNoImage
ShowOriginalImage
ShowPaths
ShowPathsAndTransparentArtwork
showtemplate
ShowTransparentImage
simplify menu item
sizeStepDown
sizeStepUp
snapgrid
Snapomatic on-off menu item
snappoint
snapPref
spacing
Stray Points menu item
Style Palette
SWFPresets
switchSelTool
switchUnits
systemInfo
Text Objects menu item
Text Wrap Options...
textpathtype3d
textpathtypeGravity
textpathtypeOptions
textpathtypeRainbow
textpathtypeSkew
textpathtypestairs
textthreads
threadTextCreate
tile
Title Case Change Case Item
toggleAutoHyphen
toggleLineComposer
Tracing Options
TracingPresets
tracking
Transform3
transformagain
transformmove
transformreflect
transformrotate
transformscale
transformshear
Transparency Presets
TransparencyGrid Menu Item
TrimMark2
Twirl Tool2
type-horizontal
type-vertical
undo
ungroup
unitundoPref
unlockAll
UpperCase Change Case Item
userInterfacePref
view1
view10
view2
view3
view4
view5
view6
view7
view8
view9
Welcome screen menu item
ZigZag2
zoomin
zoomin2
zoomout
How to make focus on input field in dialog?
How to make the value field be focused when dialog opened? I.e. the idea is to imitate user click in the input field to make it active.
diaogGroup.elements = [
{
"type":"edittext",
"value":"",
"characters":1,
"visible":true
},
];
Apply Dropshadow Live Effect
Hi All
I am trying to apply a drop shadow live effect.
The post is very helpful
The fxg string I get is
<ai:LiveEffect index="0" major="1" minor="0" name="Adobe Drop Shadow"> <ai:Dict data="B pair 1 R opac 1 R dark 100 R horz 7 R blur 0 I csrc 0 I blnd 0 R vert 7 B usePSLBlur 1 I Adobe Effect Expand Before Version 16 "> <ai:Entry name="sclr" valueType="F"> <ai:Fill color="1 0.75 0.68 0.67 0.902"/> </ai:Entry> </ai:Dict></ai:LiveEffect>
I am stuck how to convert this into the LiveEffectXML string
The effects demonstrated in the above post and the links found on it don't have the extra <ai:Entry> tag, I don't know what to do with it.
I'm also confused by the last bit
I Adobe Effect Expand Before Version 16 "
I would think all the spaces between the words is going to cause trouble also I don't know why there's a space after the integer 16 ?
Has anyone figured this out?
Regards
Trevor
Change spot color and move to specific layer
I am new with scripting in Illustrator but see a need to script some repetitive tasks.
I start with a document that has most art on Layer 15 colored with various spot colors
I need to select all strokes of a specific color, change it to another color and move it to a different sub layer.
Layer 15
all art
Template layer
Cut
Bleed
Score
Can someone please get me started with the commands? I picked up on others who were moving items to different layers, but not changing colors also.
UI - switch beetwen 2 windows
Hello, I found this limitations in ExtendScript Toolkit help:
4.1 “Nested” modal dialogs
The following sequence of operations using dialog (modal) windows is illegal, and will result in an
application crash (assuming the script created two separate dialog windows - win1 and win2):
var result1 = win1.show();
win1.hide();
/* Create and show a nested dialog */
var result2 = win2.show();
win2.close();
win1.show();
win1.close();
As noted in the JavaScript Tools Guide document, calling hide() for a dialog window does not only
change the window's visibility; it is equivalent to calling close(0), which removes the window from its
modal state. If the script calls show() a second time for this window to make it visible again, the
application is likely to crash when the window is finally closed. If your script requires the use of "nested"
modal dialogs, use a sequence like this instead:
var result1 = win1.show();
/* Create and show a nested dialog */
var result2 = win2.show();
win2.close();
win1.close();
And it still doesn't work for me. It crashes or makes an error saying illegal to show and hide dialog.
var win = new Window ("dialog", "Window 1", [150, 150, 1040, 880]);
var win2 = new Window("dialog", "Window 2", [150, 150, 600, 250]);
win2_pnl = win2.add("panel", [10, 10, 440, 100], "Move slider around");
resetButton2 = win2_pnl.add("button", [25, 10, 125, 40], "Minus x");
var tpanel = win.add ("tabbedpanel", [5, 5, 650, 680]);
var general = tpanel.add ("tab", [5, 5, 400, 300], "1, 2"); //// TAB
var win_pnl = general.add ("panel", [0, 0, 500, 500], "1"); //// PANEL
var ys1 = 5; var ys2 = 30; var xxx = 20; var yyy = 10; var xx2 = 230; var yy2 = 45;
var dfg = 8;
label_CC = win_pnl.add("edittext", [xxx+220, 19+dfg, 280, 38+dfg], "100");
var slideCC = win_pnl.add("slider", [xxx, 25, xx2, 50], 0, -200, 200); slideCC.value = 100;
var images = tpanel.add ("tab", undefined, "3, 4"); //// TAB
images.alignChildren = "fill";
var imwin_pnl = images.add ("panel", undefined, "Options"); //// PANEL
imwin_pnl.dtd_decl = imwin_pnl.add ("checkbox", undefined, "123");
////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////// BUTTONS
//var buttons = win.add ("group");
button1 = win.add ("button", [50, 200, 100, 230], "Export", {name: "ok"});
button2 = win.add ("button", [250, 200, 300, 230], "Cancel");
////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////
button1.onClick = function() // WIN 1
{
var result1 = win.show();
/* Create and show a nested dialog */
var result2 = win2.show();
win2.close();
win.close();
}
resetButton2.onClick = function() // WIN 2
{
var result1 = win2.show();
/* Create and show a nested dialog */
var result2 = win.show();
win.close();
win2.close();
}
win.show ();
Transform Each
Hi all,
i'm working on a script and final step is missing, i just want to know Transform each function code on JavaScript, or at least i want to create a code can do a shortcut like (Alt+Ctrl+Shift+D)
Object > Transform > Transform Each with Reflect X and Center point position
is it possible??
Thanks a lot
How to delete specific layers?
Hi,
I have a large batch of files (100+) that all have the same layer structure. The top layer is called 'Guides', the next layer is called 'Object", the next layer is called 'Shadow' and it goes on down through another 5 layers. I'd like to create a script that will select delete certain layers (eg. 'Guides') before I save out a new file as part of an action. I'm coming from a background in Photoshop, where this could all be done in actions, but appears you can't select layers in Illustrator (please correct me if I'm wrong!).
Any help in creating a script would be most appreciated!
Dave
How to divide all textFrames in one-character-per-textFrame?
Hello:
How to divide all textFrames in one-character-per-textFrame?
Example: the textFrame "Letters" will be divided in 7 textFrames: "L", "e", "t", "t", "e", "r", "s".
Help, please.
illustrator script to rename artboard to specific name
I'm looking for a script that would allow me to rename illustrator artboard to specific name. Those would always be the same 3 names in the same order (CV, UC and GE).
When I create my Illustrator doc I always have 3 artboards, those tree artboard need to be rename to:
artboard 1 to CV
artboard 2 to UC
artboard 3 to GE
I recently discovered the power of illustrator script. I really need the learn how to make my own..
Thanks in advance
Yolaine
[CC2018] Text stretched when resizing text frame using width property
Hi,
When resizing a text frame using Applescript, modifying the width property, not only the text frame size changes, but the text is stretched.
Does anyone know how I can prevent this from happening ?
tell application "Adobe Illustrator" set myDoc to the current document tell myDoc set myFrame to page item "test" set the width of myFrame to 300 set book to false end tell endtell
Any Suggestions ?
Thanks
Batch mode creation of Pattern Swatches?
(Transferring this question from the general Illustrator forum to here)
I have 648 pngs that I need to make into pattern swatches. Is there a script that could do this in batch mode? Ideally, I'd drag them into an Illustrator document, embed them, then run a script that creates swatches from them, named according to their file names (perhaps without the .png extension). I'm using CC2015.3 on Win10.
Thanks for any help. Wondering if this is how people get into scripting - they see things Illustrator can't do and do it themselves :-)
Tom
Script to make multiple layers in one task
I have not found any ready made script to do this and would like a little help to make one. Or, if somebody would like to make this script it would be even more helpful.
The situation is this:
A full set of glyphs is ready in Illustrator and all are on Layer 1.
Artboard is set according to: http://font.is/?p=48
Glyphs are aligned to left on top of each other.
Need to make empty layers, A-Z and even more. Tedious by hand.
Then each glyph is moved from the sublayers to their own new layers. I could continue doing this part by hand.
I could of course make these layers in one file and copy them each time to each project but a script would be soooo much cooler.
Any help with this? Hints?
Thanks in advance.
Set unit preferences (Javascript)
I can't find a way to set the unit preferences for Illustrator CS6/CC using JavaScript.
I found that this works (setting units for stroke):
var units = 2; // 0-inches, 1-milllimeters, 2-points
app.preferences.setIntegerPreference("strokeUnits", units)
But I want to set the ruler units ("General" in the interface), and this does not work:
app.preferences.setIntegerPreference("rulerUnits", units)
Any help?
Peter
illustrator script to rename artboard to specific name
I'm looking for a script that would allow me to rename illustrator artboard to specific name. Those would always be the same 3 names in the same order (CV, UC and GE).
When I create my Illustrator doc I always have 3 artboards, those tree artboard need to be rename to:
artboard 1 to CV
artboard 2 to UC
artboard 3 to GE
I recently discovered the power of illustrator script. I really need the learn how to make my own..
Thanks in advance
Yolaine