Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

167
Vistas
Saving the script as a project with Document.saveAs in Adobe Illustrator

I'm trying to save the script as a project to work with it later on

var doc = app.documents.add(null, 1080 , 1080, 1);
var file = New File("/c/Users/user/Documents/05illustratorScript.ai");
app.activeDocument.saveAs(file);

It marks line2 (expected ;)

If I do instead

var doc = app.documents.add(null, 1080 , 1080, 1);
app.activeDocument.saveAs("/c/Users/user/Documents/05illustratorScript.ai");

It says Illegal argument - argument 1 (on the line2)

Has anyone successfully used this method?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Seems that I was missing to include the second argument of the method Document.saveAs which is the "Save Options" , they are in turn another object that needs to be created.

The way to create a new document and save it as a certain .ai is

var doc = app.documents.add(null, 1080 , 1080, 1);
var newFile = new File("/c/your/Path/file.ai");
var saveOptions = new IllustratorSaveOptions();
app.activeDocument.saveAs(newFile , saveOptions);
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda