CarlosCanto
Community Expert
CarlosCanto
Community Expert
Activity
‎Oct 01, 2010
10:13 AM
sorry, I meant "note" instead of tag. yes, saved selections already exist, do the following in the GUI - select your saved selection - add a note in your script - go tru all items and select the ones matching the note VBA sample: For Each pgitem In Idoc.PageItems If pgitem.Note = "circles" Then pgitem.Selected = True End If Next
... View more
‎Sep 24, 2010
06:35 PM
that's correct, I didn't try to test it with empty string before. Only difference I found using empty string is it Re-saves the Active Document too (with all artboards) (and also asks if it is ok to overwrite) + all separate files. thanks for pointing that out.
... View more
‎Sep 24, 2010
12:05 PM
1 Upvote
I didn't think it was going to be that difficult to go from VBA to JS (not having a clue on JS). Here's my first JS script to help with this question. It should work for CS4. http://forums.adobe.com/thread/726864?tstart=0 //splits the activeDocument Artboards into individual files var doc = app.activeDocument; var docName = doc.name; var docPath = doc.path; var fullName = docPath + "/" + docName; var abRange = "" for (i=1; i<=doc.artboards.length;i++) { abRange = abRange + i + "," } IllustratorSaveOptions.saveMultipleArtboards = true; IllustratorSaveOptions.artboardRange = abRange; var newFile = new File(fullName); app.activeDocument.saveAs (newFile, IllustratorSaveOptions); alert ("Artboards Saved to current document's Folder", "Split Arboards");
... View more
‎Sep 23, 2010
09:21 AM
I have good news, you could "tag" your saved selection objects in the GUI, then select them when needed via script.
... View more
‎Sep 23, 2010
09:15 AM
that works too, now there's point text and area text samples to chose from.
... View more
‎Sep 22, 2010
02:33 PM
enclose each line in quotations and add a carriage ruturn code at the end not familiar with JS (I think the code is "\n"), in VB it is Char(13), it would be like this myTextFrame.contents = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam est neque, vulputate sed consectetur eget," & Char(13) &_ "laoreet sed ipsum. Sed egestas elit tellus. Vestibulum sagittis iaculis ante, vel viverra nibh accumsan a. In a felis ut enim facilisis facilisis." & Char(13)_ sample: Illustrator.ActiveDocument.TextFrames(1).Contents = "123" & vba.Chr(13) & "456" result:
... View more
‎Sep 22, 2010
02:06 PM
no that I know of, but you could trace the image and analize the resulting vectorized colors
... View more
‎Sep 13, 2010
08:29 PM
1 Upvote
not exactly what we all want, but there's a shortcut to "Other Scripts" Ctrl+F12. On the Open dialog point to your "myScripts" folder or any other folder where your scripts are and click on the desired script....and it has good memory, it will remember your folder after Re-starting AI. or for a 100% keyboard, on windows, -Ctrl+F12 -Shirt+Tab (to switch focus to the file list) -hit the first letter of the script's name to highlight it, keep pressing if you have several scripts that start with the same letter. -press Enter it might only save 1 or 2 clicks at a time but I rather go this way than File>Scripts>etc Message was edited by: CarlosCanto
... View more
‎Sep 10, 2010
01:23 PM
try from scratch with a different application, use Excel for example, set the Reference to the CS4 library and try some simple code to see if it works.
... View more
‎Sep 10, 2010
10:37 AM
try WScript.CreateObject instead of new ActiveXObject, I tested it with an old computer (in this machine I keep getting "JScript Error Expected ";") that has no illustrator. I was able to open and show photoshop and office programs. var illustrator; illustrator = WScript.CreateObject("Illustrator.Application"); illustrator.open("c:\\temp\\1.pdf"); Carlos Canto
... View more
‎Sep 08, 2010
11:36 AM
you're welcome
... View more
‎Sep 08, 2010
11:10 AM
oooohhhh, ok so you have a script already? if I understod correctly, you need to split the artwork at the center so it goes on a front button uniform. ok, if you need to split it, you can cut it with a vertical line also, it doesn't have to use a rectangle (I got it now why you wanted to extend the rectangle to the end of the artwork), draw a line in the center of the document (document.width/2) and divide.
... View more
‎Sep 08, 2010
10:54 AM
try activedocument.activate
... View more
‎Sep 08, 2010
10:34 AM
?? I got lost, I don't know what you mean. Are you trying to script something else? or do it manually?
... View more
‎Sep 06, 2010
06:33 PM
record an action and call it from your script (VB only or AS), however the action won't work if there's no documents opened, run the action with at least one document opened.
... View more
‎Sep 05, 2010
09:33 PM
adding points via scripting might be too difficult, at least for me, I would approach it differently. Manually is not difficult at all, but as you said, doing many of them could be time consuming. manually, based on you sample art 1. draw a 4"x4" square and move it in place 2. while still selected, go to Object, Path, Divide Objects Below 3. that's it...delete objects to the right and left of your target. now, the interesting part, I assume you know where to cut (3" to the right in your example) you could script the following: 1. get the position of the target object 2. draw you cutting square 3. position it if you do VB, make an action to Divide Objects Below 4. play the action 5. delete objects P.S. just out of curiosity, how do you do it right now manually?.
... View more
‎Sep 04, 2010
03:16 PM
I can't test on CS5 now but I use it everyday at work and haven't noticed a difference with CS4 3. Alt-Click to pick up the anchor point and drag to a new posiiton 4. Let the mouse go- at this point the anchor stays locked to the cursor even if I click and am only able to unlock it from the cursor if I click on a new tool, but without getting to choose a new anchor point. I didn't know about Alt-Clicking and dragging to change the rotation reference point, Alt-Clicking works fine for that purpose without dragging. I did Alt-Click and drag with the same results, no bug or lock with CS4, I'll try CS5 on Tuesday.
... View more
‎Aug 30, 2010
12:59 PM
Hi Jens, I had the same problem, no matter what I tried, rotating via scripting keeps resetting the bounding box. I resolved it by recording an action to rotate the object, same results as if rotated manually. If you still need to rotate via scripting, VBS and AppleSript can execute Actions from script, JS can not.
... View more
‎Aug 30, 2010
12:50 AM
Hi Jean, there is a script to split multiline textFrames into single line textFrames, made by Wundes. But there's no need to do that... in a 3 line textFrame - the 1st line's position = textFrame position - the 2nd line's position = textFrame position - Leading - the 3rd line's position = textFrame position - Leading * 2 in the following VBA snip I did split the text and wrote the position of the lines on single frames, but you can get the position directly without splitting Set txtFrame = Idoc.Selection(0) txtLeading = txtFrame.Story.TextRange.CharacterAttributes.Leading For i = 1 To txtFrame.Lines.Count Set txtline = Idoc.TextFrames.Add txtFrame.Lines(i).Duplicate txtline, 1 txtline.Position = txtFrame.Position txtline.Top = txtline.Top - txtLeading * (i - 1) txtline.Left = txtFrame.Left - txtFrame.Width txtline.Contents = "Y = " & txtline.Top Next
... View more
‎Aug 29, 2010
11:58 PM
1 Upvote
yet another "super secret" way select an item in Illustrator, fire up the ESTK, link to Illustrator and drill down to show the selection.area property or, just type selection[0].area in the console
... View more
‎Aug 22, 2010
11:12 PM
5 Upvotes
Hi Katrina, starting with nothing selected, click on the first layer then Shift+Click on the last layer, now all desired layers are selected but no art is selected yet on the canvas. On the layer fly out menu click on "Hide Others" to hide all other layers, now hit Ctrl+A to select all artwork on the canvas. From here I'm not clear on what you need to do with the selection, as mentioned before if you group the selection, all objects will all end up in one layer. once you're done (save selection perhaps), on the layer fly out menu, click on "Show All Layers" to bring everything back on the screen CarlosCanto
... View more
‎Aug 19, 2010
09:22 PM
Hi Praf, here's the sintax for VBS DoScript "SelectAll", "myActions" where SelectAll is a test action that lives in myActions set of actions sorry I'm not familiar with JavaScript, but it should be something similar
... View more
‎Aug 19, 2010
11:58 AM
Hi PAS, the problem is that you're trying to read the width of the textframe container, in this case "Area Text" container, it will always be around 400 in your example. If your textframe was "Point Text" then you'll get what you need by calling the width property of the "Point Text" textframe, in this case 323.5 since you can't convert from area text to point text, you could select the contents of it and assign it to a new text frame kind aiPointText then read the width property. Carlos
... View more
‎Aug 19, 2010
10:20 AM
1 Upvote
Hi Blues, as Mark said, one the options is to use Data Sets. Data Driven Graphics is poorly documented...this is how it works 1. Make a text frame and type "English" 2. in the variables panel, click on the "make text dynamic" button, this will make the text frame variable1 3. click on the "capture Data Set" button, this will create "Data Set 1" now build the rest of the data sets 4. edit your variable1, select "English" and edit it into "Spanish" 5.click on the "capture Data Set" button, this will create "Data Set 2" 6. edit your variable1, select "Spanish" and edit it into "German" 7.click on the "capture Data Set" button, this will create "Data Set 3" that's it, to switch between data sets, click on the "Next Data Set" button for small Data Sets, manual input works just fine but for larger sets it is better to use an xml file 8. on the Variables Panel Menu, click on the "Save Variable Library" menu 9. open the file and edit it to your needs, then load it back to Illustrator 10. click on "Load Variable Library" and load your modified xml file 11. click yes when prompted to replace existing data sets 12. select your dynamic text frame, click on your Variable1 and click on the "make text dynamic" button again to reasign it the new xml library. have fun carlos canto
... View more
‎Jun 05, 2009
12:42 AM
Hi Rajeev, your code seems correct, I was able to set up all the IllustratorSaveOptions properties, except for the one you need. In fact, I don't know how to check if it was actually embeded after running the script. at least the check box is not checked if I try to save the file again. who knows, it might be a bug. CarlosCanto
... View more
‎Jun 04, 2009
10:52 PM
Larry G. Schneider wrote: Carlos, Try setting another Action before running the script. I've gotten the same problem if the action I want to run is highlighted in the action panel. Hi Larry, you're a genius, it does work when the action is not highlighted. thanks Carlos
... View more
‎Jun 03, 2009
12:45 AM
I've been thinking....If Illustrator won't help, why not get reinforcements? here's how to do it scripting photoshop with VBA '// saves the activedocument in the PhotoShop application as TIF Sub photoShopTifSave() Dim PSapp As New Photoshop.Application Dim tifOpts As New Photoshop.TiffSaveOptions PSapp.ActiveDocument.SaveAs "C:\tifftest.tif", tifOpts End Sub tha's all it takes CarlosCanto
... View more
‎Jun 02, 2009
08:55 PM
Hi Larry, Area is not a property of a textFrame. Area, as well as width and height are properties of textPath, which in turn is a property of textFrame. CarlosCanto
... View more
‎Jun 02, 2009
08:42 PM
Hi Steve, you're getting that error message when trying to run the script on a pointText type of frame, I just made a test and it works fine with TextFrames of kind AreaText, it even works on PathText TextFrames. Create a document with only one AreaText TextFrames and run the script to make sure it works. let me know how it goes CarlosCanto
... View more
‎Jun 01, 2009
10:28 PM
doScript syntax DoScript (Action as String, From as String [, dialogs as Boolean]) Iapp.DoScript "the name of the action", "the name of the action set", False '// or True that's the correct syntax, but I haven't been able to run it in my machine using VB, I get the following error, the object "play action" is not currently available. Try to see if you can get it to work in your. CarlosCanto
... View more
- « Previous
- Next »