Export JPEG for AiCS

Does anyone have a similar script that will export a JPEG out of Illustrator CS? (the script below works well for Indd).
I will play around with this. But in the mean time, maybe someone can lead me in the right direction?

Thanks,

Jeff

tell application “InDesign CS”
tell JPEG export preferences
set properties to {Exporting Selection:true, JPEG Quality:high, JPEG Rendering style:baseline encoding}
end tell
export active document format JPG to file “Illustrations:Users:admin:Desktop:Logos:Exported_Image.jpg”

end tell

Jeff,

This is what I could find.

set theChoice to choose folder with prompt "Choose destination folder."
set choiceName to theChoice as string

tell application "Illustrator CS"
	activate
	set thisDoc to current document
	display dialog "Name your file." default answer ""
	set fileName to text returned of the result
	set destPath to choiceName & fileName & ".jpg"
	export thisDoc to file destPath as JPEG with options {class:JPEG export options, quality:80, blur:0, horizontal scaling:100, vertical scaling:100, matte:false, optimization:false, artboard clipping:false, antialiasing:true} -- optimization is for web viewing, quality from 0 - 100, matte - if artboart should be matted for a color and if so use matte color RGB color info.
end tell

I did not try this on a selection of a part of a document. You may have to make a selection and create a temporary document to paste the selection in and then export it, I don’t know.

PreTech

I may have been beat to it…but here’ what I have:

tell application "Adobe Illustrator"
	tell document 1 to export to file Illustrations:Users:admin:Desktop:Logos:Exported_Image.jpg" as JPEG
end tell

I was having difficulty trying to call the export options.
Thanks to you, this little script below works perfectly for my needs:
I appreciate all your help.
Thanks,

jeff

tell application “Illustrator CS”

export document 1 to file "Illustrations:Users:admin:Desktop:Valpak.com:Exported_Image.jpg" as JPEG with options {class:JPEG export options, quality:100, blur:0, horizontal scaling:100, vertical scaling:100, matte:false, optimization:false, artboard clipping:false, antialiasing:true}