Illustrator Scripting :: Simple / Direct Method To Identify Index Of Selected Item In List Box

Jul 16, 2013

I can't seem to figure out a simple/direct method to identify the index of the selected item in a list box.

I feel like I'm missing something, but I can't seem to figure which (if any) property returns an index number if you use it with the .onChange callback for a ListBox.

The following code accomplishes what I need but isn't particularly efficient or elegant and can get muddled if you introduce multiple lists to check.

Any way to duplicate this same behavior with better code
 
var res = "palette {text: 'Example List', properties:{resizeable:true}
pnl: Panel{orientation: 'row',preferredSize: [400,600],
list1: ListBox{preferredSize: [400,550], properties:{multiselect:true,numberOfColumns:2, showHeaders:true,columnTitles: ['List 1', 'Subitem 0']}},
}}"

[Code]...

View 4 Replies


ADVERTISEMENT

Illustrator SDK :: Create List Item And SetNotifyProc To A Method?

Mar 25, 2013

I am trying to create list item and SetNotifyProc to a method. In this method, I am trying to get selected list item entry and display the text somewhere else. But AI is crashing when retrieving the entry. What is the proper way to retrieve selected entry?
 
Here is my code
 
void ListItemNotifyProc(ADMItemRef inItem, ADMNotifierRef inNotifier)
{
    IADMList list = sADMItem->GetList(inItem);    //   <-- is this correct?
    IADMEntry entry=list.GetActiveEntry();     //   <-- is this correct?
    ADMUnicode *outStr=new ADMUnicode();
    sADMEntry6->GetTextW(entry, outStr, 5);
}

View 2 Replies View Related

Illustrator Scripting :: Convert To Grayscale For Selected Item

Feb 4, 2014

It is possible to apply the Convert to Grayscale(Edit->Edit Colors->Convert to Grayscale) for the selected items in illustrator cs3 in script (javascript)?

View 12 Replies View Related

Illustrator :: Click On Item With Direct Selection Tool - Get Small Square On Each Bounding

Oct 3, 2013

When I click on an item with the direct tool I used to get a small square on each bounding box line which I could use to adjust the size of the object. Somehow it's gone away - how do I get it back?

View 2 Replies View Related

Illustrator :: Changing Color Of Lines That Identify Selected Objects

Jun 18, 2013

Some of my artboards use the color yellow to highlight selected objects. Can I change that?

View 2 Replies View Related

Illustrator Scripting :: CS6 PlacedItems Relink Method - Sometimes Producing Error

Mar 21, 2014

I am creating a script on illustrator CS6 that will loop through all the images and relink these images to there current location, it is used to update all of the links in the file. However sometimes when i run this script i will get the error 376('x ') i have searched for the meaning of this and cannot find it anywhere. It is being written in extendscript, the code i am using is shown below:
 
// execute the main function
main();
// Construct the main function
function main() {
        var retVal = "OK";
[code]....       

View 2 Replies View Related

Illustrator Scripting :: Is It Possible To Access And Run A Menu Item

Feb 6, 2013

When writting scripts to Photoshop I can use the app.runMenuItem() method to acess commands in the menus. For example: app.runMenuItem (charIDToTypeID("ZoomIn")) will run the Zoom In command.
 
Does Illustrator have any such method (or accepts anything like action description) to enable us to acess it´s menu items? For example acess Expand comnand, or Object > Live Paint > Make..

View 2 Replies View Related

Illustrator Scripting :: Page Item Name Property In UI

Jan 14, 2013

Does name property of a page item appear anywhere in the user interface in Illustratpr CS6? I thought it would be the name you assign to it in the Layers palette, but it does not appear to be.

View 2 Replies View Related

Illustrator Scripting :: Move Anchor On Path Item

Jun 21, 2013

All I am trying to do is move an anchor from one location to another using vbscript.  I have searched everywhere and scoured the scripting references but I have not been able to figure this out as of yet.
 
I am able to select anchor points without an issue....moving those points seems to be a problem. 

View 5 Replies View Related

Illustrator Scripting :: Raster-item Didn't Get Color

Mar 22, 2012

I have written a small application in .NET that gives color to Illustrator files.I have a layer with 100 color items (paths with a fillcolor). Each one has a unique name. Through that name my program looks them up, takes the fill color and applies that color to another path.Recently there was a change in Design, the drawings that I had to provide of a Fillcolor were no no longer pathitems but rasteritems (imported from photoshop). I thought ok no problem instead of setting the Fillcolor property I'll use the Colorize method on the rasteritems. It worked fine but now and then I came across a situation where raster-item didn't get the color. After digging in to it I saw that it was because some colors are Pantone colors and the colorize method on rasteritems only takes RGBColor or CMYKcolor objects. How to do it with the pantone colors?

View 1 Replies View Related

Illustrator Scripting :: Accessing Elements Of A Page Item

Jan 6, 2014

I am working on a script that performs a series of things on all of the artwork in a document.  At one point, it needs to compare the fill color of every item to a sample color.  The problem is, the artwork is a collection of compound path items and path items.  When I look for pathItems[x]. fillColor, it works fine.  When I look for compoundPathItem[x].fillColor, it comes back undefined.  So, I've moved to looking at page items, but I seem to be unable to get to the internals on the page items.  If I have a compound path item, how would I address its properties from its parent page item?  I tried:
 
pageItem[x].compoundPathItem.pathItems[0].fillColor,
pageItems[x].fillColor,   & 
pageItems[x].compoundPathItem.fillColor. 

View 9 Replies View Related

Illustrator Scripting :: How To Find Out That Art Item Has Spot Color

Jul 4, 2012

I have a number of art items on a document, some of them are filled with spot colors and some of them are with process color.Is there any method by which I can find out which color type(spot or process) is applied to the selected art item?

View 4 Replies View Related

Illustrator Scripting :: Feasible To Disable A Menu Item

Apr 10, 2012

illustrator scripting but have some knowledge in indesign scripting using javascript.In Indesign we can disable menu item thru menuActions.. Is there any object available like that to disable a existing menu (eg. File>Save).

View 1 Replies View Related

Illustrator Scripting :: Get Only Paths Of Embedded Placed Item (without Clipping)

Sep 23, 2012

I use my script to embeding a placed graphic (MyImage.embed();). Then I always get a group with the correct paths and two clipping paths in a grouped grouped groupItem.
 
My question is: I want to delete the two clipping paths to get only the correct paths of the graphic.

This is, what I always have:

and this is, what i want:

View 8 Replies View Related

Illustrator Scripting :: How To Change Colors Of Path Item

Nov 26, 2013

I'm trying to change the colors of a pathItem corresponding to the string value of several text fields in my document. I've been successful in changing the fill and stroke color of the pathItem, but I can not find any reference in the Illustrator Javascript Guide for accessing additional strokes and/or fills that have been applied to the object in the Appearance panel.

View 1 Replies View Related

Illustrator Scripting :: Biggest Path-item In A Document?

Sep 17, 2013

is there a way to determine the biggest item in a document using javascript?

View 4 Replies View Related

Illustrator Scripting :: Open Any Menu Item By Script

Jun 21, 2012

if there is a way to open any menu item by script (Javascript) in illustrator CS5/5.1? perhaps something like this:

"app.menuActions.itemByID(0123).invoke()".

I looked at the scripting reference, but i didn't found it.

View 4 Replies View Related

Illustrator Scripting :: How To Add Script To Actions Via Insert Menu Item

Jan 14, 2013

This has been an issue since at least CS4. If you add a script to your actions via "Insert Menu Iitem" (not sure if it's for all items or just scripts) and close Illustrator, those actions disappear. Apparently, in CS6, Adobe has completely ignored improving including scripts to Actions, which really makes automation powerful. As awesome as CS6 is, that part is pretty lame.

View 1 Replies View Related

Illustrator Scripting :: How To Read Swatch Used For Fill Color Of A Page Item

Mar 21, 2012

Is there a way to read the swatch used for fill color of a page item?
 
I can read the fill color but I can't read if the color is a global swatch.

View 2 Replies View Related

Illustrator Scripting :: Simple Dialog - Panel And Checkboxes

Dec 23, 2013

I have very simple dialog - just one panel and few checkboxes. When I set panel as "undefined" everything works right, but when i set a size of the panel checkboxes disappear.
 
Works
var win = new Window ("dialog", "test");
var panelOpcje = win.add("panel", undefined, "Options");
var check1 = panelOpcje.add("checkbox", undefined, "check1");
var check2 = panelOpcje.add("checkbox", undefined, "check1");
win.show();
 
This doesn't work
var win = new Window ("dialog", "test");
var panelOpcje = win.add("panel", [0,0,400,300], "Options");
var check1 = panelOpcje.add("checkbox", undefined, "check1");
var check2 = panelOpcje.add("checkbox", undefined, "check1");
win.show()

View 2 Replies View Related

AutoCAD 2010 :: Add Direct To PDF Icon Menu Item

Feb 17, 2012

add the direct to PDF icon menu item to AutoCAD 2012.

View 4 Replies View Related

Illustrator Scripting :: Iterate Through Selected Characters

May 3, 2012

Code snippet to show me how to iterate through the selected text (not the frame!, not the words, only the selected chars) and make any change on the characterAttributes (size, color, etc.)?
 
In the property "app.activeDocument.selection" usually the selected objects are stored as an array. Now when I select characters in a textframe (or TextPath, whatever) there is a [Textrange] in it. I already tried some combinations like this snippet underneath but I still get errors, that selectedChars[i] is undefined.I'm on Illustrator CS4, Mac OS X, Javascript
 
var selectedChars = app.activeDocument.selection.characters;
for (i = 0; i < selectedChars.length; i++ ){                           
selectedChars[i].characterAttributes.fillColor = myNewCMYKColor;

View 14 Replies View Related

Illustrator Scripting :: Get Position Of Selected Object

Oct 4, 2012

is there a way to get position of any selected object? It seems like normally you have to dive into specific item like textFrames to get position, but was curious if there was a generic way of doing this for selected objects.

View 5 Replies View Related

3ds Max :: Shader List (Volume) Duplicates Last Item In List

Nov 4, 2011

I use a setup with Shader List (Volume) with two mists. One regular and one to blur out the horizon. After working on the scene for some time I notice that the shader list now contains eight copies of the last shader. I think I would remember if I did that. So, whats up with the shader list?

View 1 Replies View Related

Illustrator Scripting :: How To Determine The Size Of Selected Text

Sep 6, 2012

I'd like to draw a box around some selected text (a textRange), however I can't figure out how to detemine the size or position of the text.  The overall size of a textFrame is possible to find (not sure about position), but when you've got just a few characters selected I don't see any way to get the size or position. 

View 6 Replies View Related

Illustrator Scripting :: Align Selected Objects To Artboard

Nov 15, 2013

Simple solution to aligning selected items to the artboard. I was going to create an action but then realized it would be more convenient for me to include it in my script file....I have a script to align objects with each other but they dont align to the artboard.

View 11 Replies View Related

Illustrator Scripting :: How To Set Color For Each Selected Object Via Eyedropper

May 30, 2013

When I run the script for an object selection, I want each object to have its color set to the underlying color as if I had used the eyedropper tool.  Is this something that can be scripted?

View 1 Replies View Related

Illustrator Scripting :: Get Width That Multiple Selected Items?

Apr 23, 2013

How can I get width that multiple selected items? (Not grouped.)
 
//---------- source code ----------
 var mm = 2.83464566929134 //unit conversion. (point->milimeter)
var W = docRef.selection[0].width/mm;
alert(W); 
//---------- source code ----------

View 3 Replies View Related

Illustrator Scripting :: Turn Selected Sublayers Into Top Level Layers

Jun 5, 2008

I wanted to ask if by chance any of the scripting gurus here happen to have written an AI script that will take a number of selected sublayers/sub-sublayers and move them so they become top-level layers?

I am really needing this very badly, given that After Effects can only handle AI layers as separate entities. So I find myself moving tens, even hundreds of nested sublayers to the top level all the time.

Is it possible this script exists already?

View 16 Replies View Related

Illustrator Scripting :: How To Return Array Of Paths In The Order They Were Selected

Feb 1, 2013

Is there a method to return an array of paths in the order they were selected, instead of their descending z-index (default behaviour)?
 
I'm writing a script that "connects" the centers of currently selected objects through a stroked path, and I want it to follow the order in which I select the objects, regardless of the stacking order.

View 13 Replies View Related

Illustrator Scripting :: Replace Layer Names In Selected Layers Only?

Jan 22, 2014

I am using this script to find and replace words in layers. (The script only targets particualr words, rather than the whole layer name).
 
I would like to make it so it targets selected layers only.
 
I have found this script which loops through selected layers only, but I am not sure how to add the find and replace layer name functioality.

View 7 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved