Illustrator - Crop Area

No big issue I can get rid of this using SE just wondered if there was a way doing this with vanilla script? Have I overlooked something obvious? Just a bit of house keeping with my scripts now i’ve moved to CS2. BTW one of the first things i’ve noticed is “with appending extension” appears not to be working in Photoshop now is this a known issue? I know about the resize one already. Thanks

Hi Mark

Here’s something that i was tinkering with a while back eventually had no use for it went down another
route…
Not sure why this works like this really but thats scripting for you!
credit should go to Pretech for most of this code:

tell application "Illustrator CS"
	activate
	make new rectangle in current document with properties {name:"Rectangle", position:{100, 500}, height:400, width:300}
	tell current document
		set selection to path item "Rectangle"
		set TheB to geometric bounds of selection
		set properties to {crop marks:TheB}
		scale path item "Rectangle" horizontal scale 115 vertical scale 115 about center --> crop area created
		delay 2
		set properties to {crop marks:{0, 0, 0, 0}}
		scale path item "Rectangle" horizontal scale 115 vertical scale 115 about center --> crop area deleted
	end tell
end tell

Not sure if this is what your after here but there you go anyway…

Can you let me know what the issues are your having with photoshop i’m gonna be looking at a script for that later today
don’t want to be tearing my hair out for hours if there’s a known bug in certain parts!! thanks

Thanks pidge1 but I think I should have made myself a bit clearer. Im not trying to create tick marks which I have been able to do like this using SE.

tell application "Adobe Illustrator"
	activate
	make new document at front with properties ¬
		{color space:CMYK, width:576, height:864}
	set docRef to the current document
	tell docRef
		set RecX to (576 - 216) / 2
		set RecY to (864 + 288) / 2
		set MyRec to make new rectangle in layer 1 with properties ¬
			{fill color:{cyan:0, magenta:0, yellow:0.0, black:50.0}, stroked:false, position:{RecX, RecY}, width:216, height:288}
		set selection to path item 1
		tell application "System Events"
			tell process "Adobe Illustrator"
				tell menu bar 1
					click menu item "Crop Marks" of menu 1 of menu item "Create" of menu "Filter"
				end tell
			end tell
		end tell
	end tell
end tell

Im using ilustrator to filter some multi channel images files so they can used in quark basically opening them which produces the crop area thing which I don’t require. This is the SE I was on about if that makes anything clearer, like I say its no big issue.

			tell application "System Events"
				tell process "Adobe Illustrator"
					tell menu bar 1
						click menu item "Release" of menu "Crop Marks" of menu item "Crop Area" of menu "Object"
					end tell
				end tell
			end tell

What have you got to do with PS?

Just playing a little with this I found that doing this

set crop marks of current document to {0,0,0,0}

will change Object menu to only having the Make item available. The crop marks are still visible in the document from the original crop area but seems to be released. I don’t know if this will just change the info that Quark looks for or not resulting in a crop area the size of the document, but it may be worth trying.

Thanks for the mention Pidge1. :slight_smile:

PreTech

Hi Mark

Sorry about the script it just gets rid of the crop area i guess you still need it for position…
think you might have to stick with the GUI version, i would be interested to know if you solve it though!!

Has for the Photoshop script, i will be resizing some images in a script i’m gonna
look into later.
you mentioned that resizing in photshop was a bit buggy have you got any examples?

In CS all was fine and I knew about the bugs in CS2 when I started scripting it was mentioned to me if I was to start then getting used to using pixels as units of measure would make things simpler when moving to CS2. Basically you used to be able to use the current ruler units as measures for such things as resize and transform etc this has been buggered up and you now have to work around by resizing the file to 72dpi first then all will be OK then resize back. A present Im just playing with the new features and working out which of the work arounds would suit me best probably the the one i’ve mentioned. Still experimenting though.