Illustrator Scripting :: Change Cursor While Script Running?
Aug 15, 2012
Is it possible to change the cursor while a script is running? I have several scripts which work on large numbers of objects, and it would be very useful to have the cursor change to the spinning color wheel or hourglass while the script is looping away.
I understand that Adobe's JavaScript Toolkit would let you build a progress-bar dialog, but the delays are rarely long enough to justify such a thing. All the same, a change of cursor would reassure users (and not just me!) that things were indeed happening.
View 2 Replies
ADVERTISEMENT
Apr 10, 2012
How do I set a folder as a relative path to where the script is running?
is there any easy way like in unix, starting without / ?or for example
"~/Desktop/"
"/users/<login>/desktop/"
seems that path to me is the only way...
is there an easy way to change posix paths to applescript??
I have this code:
tell application "Finder" to set templateFile to (container of (path to me) as string) & "Graficas FINAL ADQAT.ai"
with this error: error "No se ha encontrado el archivo Macintosh HD:Users:Vibra:Desktop:Graficas FINAL ADQAT.ai." number -43 from "Macintosh HD:Users:Vibra:Desktop:Graficas FINAL ADQAT.ai"
the file is there how I change the filepath to be compatible with applescript?
View 3 Replies
View Related
Sep 16, 2013
↑ : now ↑ : i want
function getInfo(){
var win =new Window ("dialog");
win.orientation = "column";
var first = win.add ("edittext", undefined, "");
first.active = true;
[Code]...
i know ".active = true" is solution. But it's not working my script.
what is my fault?
How can i put cursor in ScriptUI edittext form?
View 2 Replies
View Related
Oct 24, 2013
How can I get keyboard cursor(caret) position in javascript?
I made a multilined edittext in ScriptUI.
But It's not working about Enter key.
All I want is when I push 'enter' key, begin a new line.
If I know how to get keyboard cursor position, I can insert ' ' character in middle of sentances.
////////////////////////////////////////////////////////////////////// ///////////////
var win =new Window ("dialog", '');
win.orientation = "column";
var grpContents = win.add("group")
var codeInput = grpContents.add ("edittext", [0, 0, 150, 550], "", {multiline:true});
codeInput.alignment = ['fill', 'top']
[code]....
I use windowsXP and Illustrator CS3.
View 4 Replies
View Related
Oct 30, 2012
My cursor has decided to display in an impossibly light blue. I want my black cursor back. What do I do?
View 4 Replies
View Related
Sep 12, 2013
Why can't I see the cursor when I need to change a word or sentence?
View 33 Replies
View Related
Sep 23, 2013
How do I change my cursor from hand to arrow, it want let me select anything for editing?
View 1 Replies
View Related
Sep 13, 2012
I frequently record Illustrator Actions. My actions are quite long, but they all involve three common steps:
-Assigning Notes to shapes
-Assigning Swatches to shapes
-Selecting shapes that have a specific notes
I often need to re-record my actions to repeat all the steps, but to change the notes/swatches that are selected/assigned during the action.
Illustrator has a re-record command. This command is great for changing the value of the note in number 3 of my list. However, it does not work for items 1 & 2 in my list. For these items I have to delete the old step in the action and then record a new step with the new swatch/note.
I know macros in Microsoft Office have an editor which allow you to change values in actions. Is there anything similar for Illustrator actions?You can save an Illustrator action and open it in Text Edit. However, all the attribute/swatch values are saved as weird strings, so I don't know how to change them.
View 4 Replies
View Related
Feb 6, 2013
I am trying to change the color of all items on and under a specific layer.I have been successful changing the color of specific types of objects (paths), but I need to accommodate all the types on the layer and sub layers.
I can recurse to as many sub layers as I expect, but how do I accommodate the page Items, path Items, group Items, compound Path Items, etc.I was thinking of pushing everything to an array, but I have no experience with arrays...
View 3 Replies
View Related
Feb 4, 2013
I managed to write this javascript. It automatically changes the colors from one swatch (byName) to another (byName) in my opened illustrator file. But if this one color doesn't exist as a fill or outline color in a file, I get an error message, because the script can not detect the color. The script stops. I am working on a batch of Illustrator files with 3 colors to change, but some files contain just 1 or 2 of the colors.Is there a command for javascript which says: "Only change the color, if the color appears"?
Here is the script:
var docRef = app.activeDocument;
with (docRef) {
var findColor = swatches.getByName('TSB Dark Blue').color;
var replaceColor = swatches.getByName('TSBDB').color;
[code]....
View 2 Replies
View Related
Sep 30, 2013
I would like to make the active layer name the same as the document name. I know very little about scripting. I found this script:
var idoc = app.activeDocument;var ilayer = idoc.activeLayer;var filename = idoc.name;ilayer.name = filename;
It does almost what I need it to do. except that it also copies the ".ai" in to the layer name. Is there some way to modify this script to have it exclude or delete the file extension?
View 4 Replies
View Related
May 4, 2012
I want to overprint a PMS colors using Applescript. I though if I changed the property of the selected items fill color from (fill overprint:false) to (fill overprint:true) it would work. This doesn't seem to change a thing.
This is the script I am currently using:
script ChangeOverprint
tell application "Adobe Illustrator"
local docRef
[Code]....
This is the picture of a simple document I created. The elipse has fill overprint:true. The polygon has filr overprint:false. The original value for the property fill overprint was false. I changed it in the script to true. Which the log shows it changed.
View 1 Replies
View Related
Jun 8, 2012
I created an action to change the width of an image. I execute the action using DoScript javascript method.
The first action Obj1 will select the whole image and second action Obj2 will open the transform panel and change the width of the image.
app.Open("D:LWW_Castoff45991_09_03.eps")
app.DoScript("Obj1", "LWW")
While (app.ActionIsRunning)
Thread.Sleep(500)
[Code]...
In the above code, the second action 'Obj2' is not getting executed. Both the actions are getting executed individually. Let me know the problem and how to execute both the actions.
View 5 Replies
View Related
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
Nov 18, 2010
I wonder if the CS5 command "Change to global rulers" is scriptable. When I try to record it as an Action script step, it is not recorded and I do not see anything in the JavaScript-ing guide on setting this programatically either.
View 3 Replies
View Related
Jan 23, 2014
Is it possible to change the location of where illustrator looks for scripts, or is it possible to add a location?
View 9 Replies
View Related
Jun 6, 2012
I am trying to create a script who could act as an Autocad plot (ie convert each color to black, with a different line weight).
Here is the first script I melted, who create my Black swatch
if ( app.documents.length > 0 ) {
var myDoc = app.activeDocument;
//add Black swatch
var newSwatch = app.activeDocument.swatches.add()
var newColor = new GrayColor();
newColor.gray = 100;
[Code] .........
And here is the second one, who replace one color by Black (it don't change the text, nor the lineweight yet…
if ( app.documents.length > 0 ) {
//test de dialogue
function csDialog() {
var fabGroup = app.activeDocument.swatchGroups.getByName('Fabrics');
var allFabs = fabGroup.getAllSwatches();
var fabNames = Array();
[Code] ........
View 2 Replies
View Related
Mar 20, 2012
I have a couple thousand AI authored EPS files with a specific swatch name (SpotBlack) that I would like to rename (black) -- is there any method to do this en masse, preferrably outside of Illy using a text editor?
View 7 Replies
View Related
Apr 3, 2012
For example I would like to make my images layer Green and my copy layer Red in my layers palette.
View 6 Replies
View Related
Apr 14, 2010
changing the file path for links in an Illustrator document?
For example, let's say my Illustrator document is stored at: /Volumes/Storage/Projects/Client/AAA001/designs/concept1.ai
and I have placed 2 linked visuals:
/Volumes/Storage/Projects/Client/AAA001/visuals/big_retouch.psd
/Volumes/Storage/Projects/Client/AAA001/visuals/flattened.jpg
When I open the .AI I noticed that the reference to the visuals is under a %DocumentFiles section:
%%DocumentFiles:/Volumes/Storage/Projects/Client/AAA001/visuals/retouc hed.psd
%%+/Volumes/Storage/Projects/Client/AAA001/visuals/flattened.jpg
I need to replace "/Volumes/Storage/Projects" with "/Volumes/Projects". (There are some more complex replacements I need, but let's start here.)
View 11 Replies
View Related
Nov 26, 2012
I need the finished script to create a rectangle with no fill and a 20% gray stroke to outline each artboard. I dug this up off these boards, which works perfectly except the rectangles created have no fill or stroke. certainly save me a lot of time drawing rectangles on a daily basis.
#target illustrator
var docRef = app.activeDocument;
var artboardRef = docRef.artboards;
for(i=0;i<artboardRef.length;i++){
var top=artboardRef[i].artboardRect[1] ;
var left=artboardRef[i].artboardRect[0];
var width=artboardRef[i].artboardRect[2]-artboardRef[i].artboardRect[0];
var height=artboardRef[i].artboardRect[1]-artboardRef[i].artboardRect[3];
var rect = docRef.pathItems.rectangle (top, left, width, height);
rect.fillColor = rect.strokeColor = new NoColor();
}
View 3 Replies
View Related
Mar 26, 2013
I'm trying to use this command to change the colour of objects inside of a document using applescipt but i keep getting an error "adobe illustrator "can't get color"" the colour exists and is active on a document. I have read the manual on variables and i'm a little lost on what i'm doing wrong, heres what i've got so far:
tell application "Adobe Illustrator"
if color is "C=0 M=0 Y=0 K=90" then
set color to "C=0 M=0 Y=0 K=90"
end if
end tell
i understand this is quite basic but its all i have to start with at the moment
View 24 Replies
View Related
Jan 6, 2012
I'm trying to use some images in my ScriptUI dialog, but I want to use a "relative" path name, and I can't seem to get it to work.For example, this myScript.jsx works just fine, but as you can see, I'm using an "absolute" path name to transparencyGrid.jpg:
var w = new Window ("dialog");
var f = new File ('~/Desktop/transparencyGrid.jpg');
w.add ("image", undefined, f);
w.show ();
However, I want to be able to use a relative (to myScript.jsx) path to point at transparencyGrid.jpg, like this:
var w = new Window ("dialog");
var f = new File ('../../../transparencyGrid.jpg');
w.add ("image", undefined, f);
w.show ();
But, I can't seem to get this to work because relative paths seem to be relative to the current folder, Folder.current, not the location of the currently executing script.I say that because when I do this:
alert(Folder.current);
The only thing the alert message shows is a backslash (/), indicating to me that the current folder is the root of my OS, but I thought it would be the folder where myScript.jsx resides.
So, is there a way of setting Folder.current to the location of the actual script?
View 2 Replies
View Related
Mar 3, 2013
Okay my script to change text frame color changes the color of all text frames hidden or not.
I need it to only change visible text frames.
if ( app.documents.length > 0 ) {
newCMYKColor = new CMYKColor();
newCMYKColor.black = 0;
newCMYKColor.cyan = 0;
newCMYKColor.magenta = 0;
newCMYKColor.yellow = 0;
[Code]...
How to go about making it only change the color of text frames on the active layer? In the final script I will hide all other layers so if it could be done by a visible attribute more easily that would work just as well.
View 4 Replies
View Related
Apr 2, 2013
I'm trying to create a script in CS5 mac os10.6.8 that will change the fill color of selected pathItems. I need a simple script that will change a selected pathItem to cmyk values 2,3,15,0. I will then select this script and implement the action in a batch of 600 files.
I wish this process could be recorded as an action but when I record the action "add new swatch" I have to manually input the cmyk values, which will take forever for a batch of over 600 files.
View 15 Replies
View Related
Mar 2, 2012
Almost every time I add a linear gradient to an object I want to change the angle from 0 to 90 degrees.
Is there a script that I could use for this, so that I could assign a keyboard shortcut and press that instead of clicking the box & typing 90 all the time? (i.e. select an object, run a script & it would apply the standard black to white linear gradient at 90 degrees instead of 0.)
View 5 Replies
View Related
Jun 6, 2013
Is there a way to export a document @ a different resolution than 72DPI? I know I can set the horizontal/vertical scale to save it at a larger dimension at 72DPI, but I need the file to be actual size and 300DPI.
This is part of a larger process, and I'd prefer to do the entire process from Illustrator, and not have to open the files in Photoshop to change the size/resolution.
Also, is it possible to change the color mode to CMYK or Greyscale for the exported Jpeg?
View 7 Replies
View Related
Feb 11, 2014
I'm using AI CC now, but I noticed this problem in earlier versions of AI: If I want to place a one-word label on an illustration I move the type insertion cursor to a speific point on the screen image and click, but then the flashing insertion point, where the label will actually start, pops up elsewhere, usually a line or two above where the cursor was, and a pica or two to the left, forcing me to type the label, then move it into position rather than simply typing it in the right place and moving on. The problem is merely annoying, but I'd like to fix it. It's probably a matter of ignorance-I simply haven't read the right documentation, but I don't know what to call the problem. Where can I find out how to change the position of the cursor relative to the insertion point?
View 2 Replies
View Related
Dec 18, 2012
I'm try to automate the importing of the Varaible and datasets into my graphs via Scripting, but the ImportVaraibles() function doesn't seem to work. Here is my Script, mostly copied from the example script provided with Illustrator (CS5). And, this works manually, using the file names in the script, via Load Variable Library
Set appRef = CreateObject(strIllistratorVersion)
'Open the file and import the datasets
Set docRef = appRef.Open(strTemplate & "200-500.ai")
'docRef.Datasets.RemoveAll
docRef.Variables("Yearbook").Delete
Here is the problem, after I delete the previous library, then this next line, right from the example, does nothing
The script then exits with 'No Datasets in this document'
docRef.ImportVariables (strXMLFolder & "Lumber_200-500.xml")
'appRef.DoJavaScript "alert('Template:" & strTemplate & strRange & ".ai | XML file:" & strXMLFolder & "" & objFile.Name & "^')"
If (appRef.Documents.Count > 0) Then
Set docRef = appRef.Documents(1)
[Code]....
If I remove that delete line, the script runs, but just uses whatever Variables I had last loaded, not the XML file.
It's simply not loading. What do I need to do to get it to load?
View 8 Replies
View Related
Feb 27, 2014
In Xcode, we have to define cursor as:
resource 'CURS' (16001) {
$"00 00 00 00"
$"18 00 3C 00"
$"1E 00 0F 00"
$"07 80 03 C8"
$"01 E8 00 FC"
[Code]...
In Windows we use .cur file, simpler.
I want to convert .cur file to the mac format above, how?
View 1 Replies
View Related
May 6, 2012
Can you access graph data through the scripting DOM?
View 3 Replies
View Related