This is a very straight forward tool that generates four kinds of grid. You type in the number of rows and columns, and the size of the unit, then click a button.
While those grids might seem basic to mathematicians, I thought it'd be handy to have something like this in AI for graphic artists. Something looking basic at first can be creatively altered and became something interesting. I attached two quick-dirty mockups just to demonstrate some possibilities.
My favorite trick is to use the raster.getAverageColor() function to layout a rich and abstract color combination. If you feel like to try, copy the code below to the end of my scripts:
- -----------------------------------
// Pickup colors from a raster//
//NOTE: An image must be placed within the artboard and rasterized//
var rasters = document.getItems({
type: Raster,
selected: true
});
var paths = document.getItems({
type: Path,
selected: true
});
if(rasters.length >0 && paths.length >0){
var raster = rasters[0];
for(var i=0; i<paths.length; i++) {
var path = paths[i];
var color = raster.getAverageColor(path);
path.fillColor = color;
}
}else{
Dialog.alert('Please select at least one rasterized image and one path overlapping on top.');
}
- -------------------------------------------
UPDATE: 01/10/2012
I uploaded the above lines as a separate script.
Sorry - have only ever tried with CS5.
Try reading the general notes on Scriptographer. If that claims to work with CS3 then there is a good chance the script will work - if not, no.
Scriptographer has version for CS3, CS4,CS5...but this script want work in my CS3. So sad, it's interesting and wonderfull script)..
These no script version for CS3?
Thanks for advance!
1) Is there an error message?
2) Does another script work ok ?
3) Does the original grid generator work ?
1)Error 22:
Line 207: -> var palette new Palette ('Grid Generator', components def);
or in line 147 in another version of script
2)Many various scripts i use in CS3
3) What does it mean "original" script?
Thanks!
All inner scripts of Scriptographer_Win_CS3_2.9.073works fine. Tools too...
What's the problem?
I just downloaded
grid_generator_alts.zip
Line 206 reads
var palette = new Palette('Grid Generator', components, values);
not
var palette new Palette ('Grid Generator', components def);
which would result in an error
Has something happened to your script -- perhaps try downloading again?
Now I has download this version:
grid_generator_alts.zip
Now error is:
Error 22: Palette does not have a constructor.
Line: 206
- > var palette = new palette('Grid Generator', components,values);"
This script not compatible with CS3?
Scriptographer is compatible with CS3
- and the Palette function exists in that release
Please see the download page http://scriptographer.org/Download
and reload the CS3 instance of Scriptographer in case that has been damaged
Thank you for patience.)
I run the grid generator at lst and it work great!!! Thanks again for your support and great code!
Alteration to allow spec of sizes in inches and millimeters
Also a couple of fixes to the rectangle process.