Page 1 of 1

Open Illustrator in Photoshop

Posted: Mon Mar 09, 2015 4:01 pm
by pcarvalho
I made a script to open illustrator Eps in Photoshop, but i get the error: Script returned error: ERROR: TypeError: null is not an object

What am i doing wrong?
Can any one help me?

Here's the script:

if($error == null)
{
try
{
var epsOpts = new EPSOpenOptions();
epsOpts.antiAlias = true;
epsOpts.mode = OpenDocumentMode.CMYK;
epsOpts.resolution = 72;
epsOpts.constrainProportions = true;
epsOpts.width = new UnitValue(1024, 'px' );//alterado de 1280 para 1024

var infile = $infile;
open(infile,epsOpts);
}
catch(theError)
{
$error = theError;
}
}

$error

Re: Open Illustrator in Photoshop

Posted: Tue Mar 10, 2015 10:42 am
by loicaigon
I think you need to instantiate a File Object in the ExtendScript context :

var infile = File ( String ( $infile ) );
if ( infile.exists )…

It's probably a type mismatch.

Loic
http://www.ozalto.com

Re: Open Illustrator in Photoshop

Posted: Tue Mar 10, 2015 4:41 pm
by pcarvalho
Worked just fine.
Thank you.