Quantcast
Channel: Adobe Community : Popular Discussions - Illustrator Scripting
Viewing all 12845 articles
Browse latest View live

Find text Tint Value

$
0
0

Hi All,

 

I need to check whether any character have opacity.  I tried the following codings, but it shows all characters as error.

 

var myframe = app.activeDocument.textFrames; 
for(i=0; i<myframe.length; i++) 
{     var myCharacters = myframe[i].characters;     for(j=0; j<myCharacters.length; j++)     {          if(myCharacters[j].opacity != 100)          {              alert("Error: Check some text has opacity")              }         }     } 

 

Regards,

Karthi


Startup Script for Illustrator only

$
0
0

Hi,

 

I've made a nice palette script for Illustrator CS6 on OSX 10.6.8.

I put it into HD/Library/Application\ Support/Adobe/Startup\ Scripts\ CS6/Illustrator

 

I works fine in Illustrator.

 

BUT: If I start Indesign CS6, the palette show up twice and it is not possible to close both pallettes.

 

Any hints?

 

Next question: The palette is used to have an easy access to script. If I start the scripts with the palette, the error messages of the scripts are not displayed. If I start individal script directly in Illustrator errors are displayed. What can I do?

 

Thanks for your help.

 

 

 #target illustrator;

#targetengine main;

//var pfad = "/Applications/Adobe\ Illustrator\ CS6/Presets.localized/de_DE/Skripten/"
var pfad = "/Volumes/Platte/Hilfsmittel/Skripte/"

var win = new Window('palette', 'Daniels Zauberkiste');
var tpanel = win.add ("tabbedpanel");
tpanel.alignChildren = ["fill", "fill"];
tpanel.preferredSize = [100,20];
win.margins = 0;
win.spacing = 0;
var subtab1panel = tpanel.add ("tab", undefined, "allgemein");
subtab1panel.orientation="row";
subtab1panel.alignChildren = ["fill", "fill"];


var t1group = subtab1panel.add("group");
t1group.orientation = "column";
t1group.alignChildren = ["fill", "fill"];


var btnSelect1 = t1group.add('button', undefined, 'Passer');
var scriptToLoad1 = new File(pfad+"_Passer-Montage.jsx");
var btnSelect2 = t1group.add('button', undefined, 'Prüfpasser');
var scriptToLoad2 = new File(pfad+"_Prüfpasser-Montage.jsx");
var btnSelect3 = t1group.add('button', undefined, 'Kontur+10');
var scriptToLoad3 = new File(pfad+"_Kontur+Dok+10.jsx");
var btnSelect4 = t1group.add('button', undefined, 'Kontur+20');
var scriptToLoad4 = new File(pfad+"_Kontur+Dok+20.jsx");
var btnSelect5 = t1group.add('button', undefined, 'Standardbogen Stanze');
var scriptToLoad5 = new File(pfad+"_Bogengröße.jsx");


btnSelect1.onClick = function(){
      var des = scriptToLoad1;   des.open("r");         var bt = new BridgeTalk;   bt.target = "illustrator";         var script = des.read();   des.close();              bt.body = script;   bt.send();  
}// end function


btnSelect2.onClick = function(){
      var des = scriptToLoad2;   des.open("r");         var bt = new BridgeTalk;   bt.target = "illustrator";         var script = des.read();   des.close();              bt.body = script;   bt.send(); 
}// end function


btnSelect3.onClick = function(){
      var des = scriptToLoad3;   des.open("r");         var bt = new BridgeTalk;   bt.target = "illustrator";         var script = des.read();   des.close();              bt.body = script;   bt.send();
}// end function


btnSelect4.onClick = function(){
      var des = scriptToLoad4;   des.open("r");         var bt = new BridgeTalk;   bt.target = "illustrator";         var script = des.read();   des.close();              bt.body = script;   bt.send();
}// end function


btnSelect5.onClick = function(){
      var des = scriptToLoad5;   des.open("r");         var bt = new BridgeTalk;   bt.target = "illustrator";         var script = des.read();   des.close();              bt.body = script;   bt.send();
}// end function










win.center();
win.show();

How change setting of Preference of Illustrator by Script?

$
0
0

How turn on or turn off setting in Preference -> Type -> Enable Missing Glyph Protection by Script?

Thank you.

Problem when passing value to resolution (Export TIFF)

$
0
0

I´m passing by a strange script behaviour. I´m trying to refine a script to export artboards as TIFF.

 

So suppose I started "var op = new ExportOptionsTIFF()"

 

And I set op.resolution = 250

 

Now I try to run this script via Extended Script Toolkit. I press play and it goes right...But If I make more tests I have this problem:

 

If I set a differnt resolution (for example, 365) the Script will ignore this new and will use the only value 250 defined in the past (in my first test). If, for a third time, I set another new value, the Extended Script will ignore this value and use the 365 I set in a previous test.

Look´s it´s recording the differnt values I put but it is always delayed one or two times :/

 

Do not know if I was able to better explain the problem.

 

Have you already passed by it?? Should I consider this as a problem? Or it´s only an Extendes Script software mistake?

 

Thank you a lot

Gustavo.

How to sort objects alphabetically (inside of a layer)?

$
0
0

How to sort objects alphabetically (inside of a layer) on layer list?

I have already tried scripts for Layer sorting. They work indeed for the layers, but not the objects themselves packed inside.

How delete a Action Set in Illustrator by Script?

$
0
0

this my code Load and unload a Action in Illustrator. But Action Set [Test_Set_Action] still exist after unload .

oIllustrator.loadAction("C:\Test_Set_Action.aia")

oIllustrator.unloadAction("Test_Set_Action", "CVCMYK")

How delete a Action Set [Test_Set_Action] after unload by Script?

Or check [Test_Set_Action]  still exist?

Link location switch

$
0
0

I am using a script that will allow me to change an illustrator asset link location from my high res asset library to low res asset library or thumb drive and back. I would like to change the script to change the thumb drive to a Box Sync folder. I am able to get the link path to switch from my HR or LR library to Box Sync, but not back from Box Syn to HR or LR.

 

I am running Mac OS 10.11.4 with Illustrator CC 2015 18.0.0.

 

Here is my two scripts. First is my thumb drive that works and then my Box Sync that works only one way.

 

setUSBLinkto "HD TD00"

setLoResLinkto "CG Master_LR"

setHiResLinkto "CG Master_HR"

setNewExt1to ".tif"

setNewExt1Smallto "-sm.tif"

setErrorListto {}

setLinkInspectto {}

tellapplication "Adobe Illustrator"

  activate

  setuser interaction leveltointeract with all

  display dialog "Please chose link mode" buttons {"HiRes", "LoRes", "ThumbDrive"} default button 2

 

  ifthebutton returnedoftheresultis "HiRes" then

 

 

  setErrorListtoErrorList& myLinkSwitch(document 1, LoResLink, HiResLink, 3, NewExt1)

  setErrorListtoErrorList& myLinkSwitch(document 1, USBLink, HiResLink, 3, NewExt1)

 

 

  elseifbutton returnedoftheresultis "LoRes" then

 

  setErrorListtoErrorList& myLinkSwitch(document 1, HiResLink, LoResLink& ":Assets", 2, NewExt1Small)

  setErrorListtoErrorList& myLinkSwitch(document 1, USBLink, LoResLink, 2, NewExt1Small)

 

  else

 

  setErrorListtoErrorList& myLinkSwitch(document 1, LoResLink, USBLink, 2, NewExt1Small)

  setErrorListtoErrorList& myLinkSwitch(document 1, HiResLink, USBLink& ":Assets", 2, NewExt1Small)

 

  endif

 

  setuser interaction leveltointeract with all

  setErrorListtomyremoveDuplicates(ErrorList)

  ifErrorListisnot {} then

  setLinkInspectto (choose from listErrorListwith prompt "Reveal The Files" withmultiple selections allowed)

  endif

  --display dialog "The following files were not relinked:" & return & ErrorList

  ifLinkInspectisnot {} then

  try

  repeatwithalbiefrom 1 tocountofLinkInspect

  tellapplication "Finder"

  activate

  delay 0.5

  revealitemalbieofLinkInspect

  endtell

  endrepeat

  endtry

  endif

endtell

 

 

 

 

ongetBaseName2(fName, Char)

  tellapplication "System Events"

  setNoExtto {}

  setZto 0

  setBaseNametoreverseofeveryitemoffName

  repeatwithidxfrom 1 tocountofBaseName

  ifitemidxofBaseNameisCharthen

  exitrepeat

  else

  setZtoZ + 1

  endif

  endrepeat

  returnitems 1 thru ((countofBaseName) - 1 - Z) ofreverseofBaseNameasstring

  endtell

 

endgetBaseName2

 

onFolderPathtoList(myPath, TrimFront, TrimBack)

 

  setFolderPathto {}

  setoldDelimiterstoAppleScript'stext item delimiters-- always preserve original delimiters

  setAppleScript'stext item delimitersto {":"}

  setpathItemstotext itemsof (myPathastext)

  setTFto (TrimFrontasnumber) + 1

  setTBto ((countofpathItems) - TrimBackasinteger) asinteger

  setAppleScript'stext item delimiterstooldDelimiters

  returnitemsTFthruTBofpathItemsaslist

endFolderPathtoList

 

 

 

 

ontrim_line(this_text, trim_chars, trim_indicator)

  -- 0 = beginning, 1 = end, 2 = both

  setxtothelengthofthetrim_chars

  -- TRIM BEGINNING

  ifthetrim_indicatorisin {0, 2} then

  repeatwhilethis_textbegins withthetrim_chars

  try

  setthis_texttocharacters (x + 1) thru -1 ofthis_textasstring

  onerror

  -- the text contains nothing but the trim characters

  return ""

  endtry

  endrepeat

  endif

  -- TRIM ENDING

  ifthetrim_indicatorisin {1, 2} then

  repeatwhilethis_textends withthetrim_chars

  try

  setthis_texttocharacters 1 thru -(x + 1) ofthis_textasstring

  onerror

  -- the text contains nothing but the trim characters

  return ""

  endtry

  endrepeat

  endif

  returnthis_text

endtrim_line

 

onremoveDuplicates(lst)

  locallst, itemRef, res, itm

  try

  iflst'sclassisnotlistthenerror "not a list." number -1704

  scriptk

  propertyl : lst

  propertyres : {}

  endscript

  repeatwithitemRefink'sl

  setitmtoitemRef'scontents

  -- note: minor speed optimisation when removing duplicates

  -- from ordered lists: assemble new list in reverse so

  -- 'contains' operator checks most recent item first

  ifk'sresdoes notcontain {itm} then¬

  setk'sres'sbeginningtoitm

  endrepeat

  returnk'sres'sreverse

  onerroreMsgnumbereNum

  error "Can't removeDuplicates: " & eMsgnumbereNum

  endtry

endremoveDuplicates

 

 

onotherTrim(StringToTrim, TheDelimiter, TheDirection)

  setTheResultto {}

  setStringToTrimtoStringToTrimasstring

  ifTheDirectionis 0 then

  setZtoreverseofeverycharacterofStringToTrimasstring

  repeatwithfrfrom 1 tocountofZ

  ifitemfrofZisTheDelimiterthen

  exitrepeat

  else

  setendofTheResulttoitemfrofZ

 

  endif

  endrepeat

  setTheResulttoreverseofTheResultasstring

  else

  --Forward Goes Here

  endif

endotherTrim

 

onCharacterCheck(TheString, CheckCharacter)

  setCheckSumto 0

  setTheStringtoeverycharacterofTheString

  repeatwithfrfrom 1 tocountofTheString

  ifitemfrofTheStringisCheckCharacterthen

  setCheckSumtoCheckSum + 1

  endif

  endrepeat

  returnCheckSum

endCharacterCheck

 

onLinkSwitch(TheDoc, DriveOld, DrivNew, TheTrim, FileEnd)

  tellapplication "Adobe Illustrator"

  setuser interaction leveltonever interact

  tellTheDoc

  setDocLinkstoeveryplaced item

  settempErrorto {}

  repeatwithAvafrom 1 tocountofDocLinks

  setnewlinkto {}

  setpathcounttocountofmyFolderPathtoList(file pathofitemAvaofDocLinks, 0, 0)

  setNewNametomyFolderPathtoList(file pathofitemAvaofDocLinks, pathcount - 1, 0) asstring

  setNewNametomygetBaseName2(NewName, ".")

  setNewNametomygetBaseName2(NewName, "-")

  setPathCheckto (myFolderPathtoList(file pathofitemAvaofDocLinks, 0, 1))

 

 

  ifitem 1 ofPathCheckisDriveOldthen

  setendofnewlinktoDrivNew& ":"

  repeatwithEnzofromTheTrimtocountofPathCheck

  setendofnewlinktoitemEnzoofPathCheck

  setendofnewlinkto ":"

 

  endrepeat

  setnewlinktonewlink& NewName& FileEndasstring

 

  try

  setfile pathofitemAvaofDocLinkstonewlink

 

  try

  setnameofitemAvaofDocLinkstoNewName& NewExt1asstring

  endtry

  onerror

  setendoftempErrortofile pathofitemAvaofDocLinksasstring

  endtry

  else

  setxtocountofmyFolderPathtoList(file pathofitemAvaofDocLinksasstring, 0, 0)

  --return my FolderPathtoList(file path of item Ava of DocLinks & return as string, x - 2, 1)

 

 

  ifmyFolderPathtoList(file pathofitemAvaofDocLinksasstring, x - 2, 1) asstringisnot "ALT" then

  setendoftempErrortofile pathofitemAvaofDocLinksasstring

  endif

 

 

  endif

  endrepeat

  returntempError

  endtell

  setuser interaction leveltointeract with all

  endtell

endLinkSwitch

 

 

 

Box Sync Script:

 

setBoxSyncto "Mac OSX:Users:artist:Box%20Sync:CG%20Master_LR"

setLoResLinkto "CG Master_LR"

setHiResLinkto "CG Master_HR"

setNewExt1to ".tif"

setNewExt1Smallto "-sm.tif"

setErrorListto {}

setLinkInspectto {}

tellapplication "Adobe Illustrator"

  activate

  setuser interaction leveltointeract with all

  display dialog "Please chose link mode" buttons {"HiRes", "LoRes", "BoxSync"} default button 2

 

  ifthebutton returnedoftheresultis "HiRes" then

 

 

  setErrorListtoErrorList& myLinkSwitch(document 1, LoResLink, HiResLink, 3, NewExt1)

  setErrorListtoErrorList& myLinkSwitch(document 1, BoxSync, HiResLink, 3, NewExt1)

 

 

  elseifbutton returnedoftheresultis "LoRes" then

 

  setErrorListtoErrorList& myLinkSwitch(document 1, HiResLink, LoResLink& ":Assets", 2, NewExt1Small)

  setErrorListtoErrorList& myLinkSwitch(document 1, BoxSync, LoResLink, 2, NewExt1Small)

 

  elseifbutton returnedoftheresultis "BoxSync" then

 

  setErrorListtoErrorList& myLinkSwitch(document 1, LoResLink, BoxSync, 2, NewExt1Small)

  setErrorListtoErrorList& myLinkSwitch(document 1, HiResLink, BoxSync& ":Assets", 2, NewExt1Small)

 

  endif

 

  setuser interaction leveltointeract with all

  setErrorListtomyremoveDuplicates(ErrorList)

  ifErrorListisnot {} then

  setLinkInspectto (choose from listErrorListwith prompt "Reveal The Files" withmultiple selections allowed)

  endif

  --display dialog "The following files were not relinked:" & return & ErrorList

  ifLinkInspectisnot {} then

  try

  repeatwithalbiefrom 1 tocountofLinkInspect

  tellapplication "Finder"

  activate

  delay 0.5

  revealitemalbieofLinkInspect

  endtell

  endrepeat

  endtry

  endif

endtell

 

 

 

 

ongetBaseName2(fName, Char)

  tellapplication "System Events"

  setNoExtto {}

  setZto 0

  setBaseNametoreverseofeveryitemoffName

  repeatwithidxfrom 1 tocountofBaseName

  ifitemidxofBaseNameisCharthen

  exitrepeat

  else

  setZtoZ + 1

  endif

  endrepeat

  returnitems 1 thru ((countofBaseName) - 1 - Z) ofreverseofBaseNameasstring

  endtell

 

endgetBaseName2

 

onFolderPathtoList(myPath, TrimFront, TrimBack)

 

  setFolderPathto {}

  setoldDelimiterstoAppleScript'stext item delimiters-- always preserve original delimiters

  setAppleScript'stext item delimitersto {":"}

  setpathItemstotext itemsof (myPathastext)

  setTFto (TrimFrontasnumber) + 1

  setTBto ((countofpathItems) - TrimBackasinteger) asinteger

  setAppleScript'stext item delimiterstooldDelimiters

  returnitemsTFthruTBofpathItemsaslist

endFolderPathtoList

 

 

 

 

ontrim_line(this_text, trim_chars, trim_indicator)

  -- 0 = beginning, 1 = end, 2 = both

  setxtothelengthofthetrim_chars

  -- TRIM BEGINNING

  ifthetrim_indicatorisin {0, 2} then

  repeatwhilethis_textbegins withthetrim_chars

  try

  setthis_texttocharacters (x + 1) thru -1 ofthis_textasstring

  onerror

  -- the text contains nothing but the trim characters

  return ""

  endtry

  endrepeat

  endif

  -- TRIM ENDING

  ifthetrim_indicatorisin {1, 2} then

  repeatwhilethis_textends withthetrim_chars

  try

  setthis_texttocharacters 1 thru -(x + 1) ofthis_textasstring

  onerror

  -- the text contains nothing but the trim characters

  return ""

  endtry

  endrepeat

  endif

  returnthis_text

endtrim_line

 

onremoveDuplicates(lst)

  locallst, itemRef, res, itm

  try

  iflst'sclassisnotlistthenerror "not a list." number -1704

  scriptk

  propertyl : lst

  propertyres : {}

  endscript

  repeatwithitemRefink'sl

  setitmtoitemRef'scontents

  -- note: minor speed optimisation when removing duplicates

  -- from ordered lists: assemble new list in reverse so

  -- 'contains' operator checks most recent item first

  ifk'sresdoes notcontain {itm} then¬

  setk'sres'sbeginningtoitm

  endrepeat

  returnk'sres'sreverse

  onerroreMsgnumbereNum

  error "Can't removeDuplicates: " & eMsgnumbereNum

  endtry

endremoveDuplicates

 

 

onotherTrim(StringToTrim, TheDelimiter, TheDirection)

  setTheResultto {}

  setStringToTrimtoStringToTrimasstring

  ifTheDirectionis 0 then

  setZtoreverseofeverycharacterofStringToTrimasstring

  repeatwithfrfrom 1 tocountofZ

  ifitemfrofZisTheDelimiterthen

  exitrepeat

  else

  setendofTheResulttoitemfrofZ

 

  endif

  endrepeat

  setTheResulttoreverseofTheResultasstring

  else

  --Forward Goes Here

  endif

endotherTrim

 

onCharacterCheck(TheString, CheckCharacter)

  setCheckSumto 0

  setTheStringtoeverycharacterofTheString

  repeatwithfrfrom 1 tocountofTheString

  ifitemfrofTheStringisCheckCharacterthen

  setCheckSumtoCheckSum + 1

  endif

  endrepeat

  returnCheckSum

endCharacterCheck

 

onLinkSwitch(TheDoc, DriveOld, DrivNew, TheTrim, FileEnd)

  tellapplication "Adobe Illustrator"

  setuser interaction leveltonever interact

  tellTheDoc

  setDocLinkstoeveryplaced item

  settempErrorto {}

  repeatwithAvafrom 1 tocountofDocLinks

  setnewlinkto {}

  setpathcounttocountofmyFolderPathtoList(file pathofitemAvaofDocLinks, 0, 0)

  setNewNametomyFolderPathtoList(file pathofitemAvaofDocLinks, pathcount - 1, 0) asstring

  setNewNametomygetBaseName2(NewName, ".")

  setNewNametomygetBaseName2(NewName, "-")

  setPathCheckto (myFolderPathtoList(file pathofitemAvaofDocLinks, 0, 1))

 

 

  ifitem 1 ofPathCheckisDriveOldthen

  setendofnewlinktoDrivNew& ":"

  repeatwithEnzofromTheTrimtocountofPathCheck

  setendofnewlinktoitemEnzoofPathCheck

  setendofnewlinkto ":"

 

  endrepeat

  setnewlinktonewlink& NewName& FileEndasstring

 

  try

  setfile pathofitemAvaofDocLinkstonewlink

 

  try

  setnameofitemAvaofDocLinkstoNewName& NewExt1asstring

  endtry

  onerror

  setendoftempErrortofile pathofitemAvaofDocLinksasstring

  endtry

  else

  setxtocountofmyFolderPathtoList(file pathofitemAvaofDocLinksasstring, 0, 0)

  --return my FolderPathtoList(file path of item Ava of DocLinks & return as string, x - 2, 1)

 

 

  ifmyFolderPathtoList(file pathofitemAvaofDocLinksasstring, x - 2, 1) asstringisnot "ALT" then

  setendoftempErrortofile pathofitemAvaofDocLinksasstring

  endif

 

 

  endif

  endrepeat

  returntempError

  endtell

  setuser interaction leveltointeract with all

  endtell

endLinkSwitch

How do I Change Swatch Names in Illustrator CC 2015?

$
0
0

First, I know nothing about scripting or writing code.  That being stated, I am trying to use a script to change the swatch names in a PDF file in Illustrator CC 2015 for the PC.  Below is what I have cobbled together.  When the script hits the doc.swatches line I receive a "i is undefined."  I also changed the name of the swatches for the privacy purposes.  Thank you.

 

var docs = File.openDialog("Select Files to Open", "*.pdf", true);

 

var idx = 0;

 

for (idx = 0; idx < docs.length; ++idx) {

 

    var doc = app.open(docs[idx]);

 

    var myCounter = 0;

 

    for (myCounter = 0; myCounter < doc.layers.length; myCounter++) {

 

        doc.layers[myCounter].locked = false;

 

    }

 

        doc.swatches[i].name = doc.swatches[i].name.split('SwatchA').join('AlphaSwatch'); 

      

        doc.swatches[i].name = doc.swatches[i].name.split('SwatchB').join('BetaSwatch');

 

 

}


How to Open Print Window via Javascript ( Normally we are using Ctrl-P shortcut in illustrator )

JavaScript to prompt user to save as PDF

$
0
0

I am making changes with code to the file. I want the user to be prompted to save as a .ai file first. I have that down. Now I am wanting to have the user immediately be prompted to save as a pdf with only the optimize for fast web view option selected. I believe it is an adobe preset of Smallest File Size.

The reason for wanting the prompt is because I want to save the files in 2 different locations.

Here is my code so far.....

var doc = app.activeDocument;
// Save as .ai file 
var fileName = doc.fullName; 
var thisFile = new File(fileName);
var saveFile = thisFile.saveDlg();
doc.saveAs (saveFile);


// Save as .pdf file
var pdfSaveOptions = new PDFSaveOptions(); 
pdfSaveOptions.pDFXStandard=PDFXStandard.PDFXNONE; 
pdfSaveOptions.compatibility = PDFCompatibility.ACROBAT5; 
pdfSaveOptions.preserveEditability = false;  
var pdfFile = new File(fileName); 
doc.saveAs(pdfFile, pdfSaveOptions);

AI CS4 Windows 7 64bit

Does Illustrator CS5 support function loadAction?

$
0
0

I try find:

Illustrator CS6 can load and unload action by:

oIllustrator.loadAction("C:\Set_Action.aia")

oIllustrator.unloadAction("Set_Action", "")

But with Illustrator CS5 i can't find these Function.

Does Illustrator CS5 support function loadAction?

convert 1 text frame to 2 threaded ones

$
0
0

Hello gays!

Please, can anyone help me to write a script which converts a text frame with text inside to 2 threaded 2-columned text frames residing on different artboards? The size of the columned frames is equal but each time varies, so maybe the script can ask for the size? The gutter size is 3 mm, the font size should be 12 pt, the interline distance 14 pt. Thank you and sorry for bad English!

I guess the initial frame should be resized and then another text frame created on a new ab and then both threaded...

"Add Used Colors": is there javascript for this?

$
0
0

I currently have a javascript which amends swatches, but first I need it to "Add Used Colors" to generate the swatches from objects in the document. Is there javascript for this?

Sorting Layers

$
0
0

I have a map of the US that is broken down into counties.  Each state has its own layer and the counties are sublayers.  I am currently going through and naming all of the counties, but I need to be able to alphabetize them.  Is there a way to do this?

 

Thanks

Batching In Illustrator??

$
0
0

In PhotoShop CS3, you can select File/Automate/Batch, and run an Action on an entire folder.  I don't see that option in Illustrator CS3?  Is there a way to run an action on an entire folder?

 

I'm attempting to save many EPS images as PNG images, and would really like to retain "vector attributes" - is any of this possible???

 

Thanks for any help.


All Group to Ungroup Script

Looking for script: Compound path, Set B&H, Fit, Export PNG, Next Image.

$
0
0

Hello,

 

I am looking for an script to automate.

 

run script on all open AI files;

- Select all

- Make Compound Path

- Set B or H to 600 pixels maximum, proportional

- Fit to Artwork Bounds

- Export to PNG, Normal 150ppi, Transparant, Anti al. supersampling

- Close Window

- Not Save

 

- Next image until end

 

Thanks and Kind Regards,

digisli

Deleting a Used Symbol Generates Error

$
0
0

I'm having difficulty writing a script that deletes all of the symbols in the document (as opposed to just breaking links or expanding which I apparently cannot do).

app.sourceDocument.symbols.removeAll();

When it reaches a symbol that's used in the document somewhere it spits out this error:

Error 1200: an Illustrator error occurred: 1346458189 ('MRAP')

How to get a XMPString, if do not open the file?

$
0
0

If open a file by illustrator ,we can get the xmp infomation,

like this:

    doc=app.activeDocument;

    var xmlString = new XML(doc.XMPString);

Can I get a XMPString by JS, and do not open the file?

 

Thanks much!

Can you hide a layers using scripting?

$
0
0

I have a very complex graphic with many elements and I would like to find a way to hide layers based on a list.  In the documentation that there is a way to tell if a layer is hidden, but didn't see anything about a way to actually to control the hide/unhide property.  Is this possible?

 

Thanks!

Viewing all 12845 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>