Open an AIT and give it a name
Hello everyone,
I'm struggling with this script. I don't know if it's possible and I just can't find it in the documentation, or it's just not possible simply, as my approach is. I've searched the forum, but could not find anything similar to this.
I run a script to open a template, but I'd like to give it a name when it's opened. The name is something I choose with a prompt. The script I have below opens the template, asks for the name, but doesn't give me an error on the naming. The script works just fine without the naming convention.
Is this possible without much scripting of like saving it as an AI to a folder and reopening it and then renaming it?
Thanks everyone.
var newName;
newName = prompt("What would you like to name this file?",0);function openFile()
{
var fileRef = new File("/s/scripts/Drawing (7x9).ait")
app.open(fileRef);
}
openFile();var doc = app.activeDocument;
File(doc).rename(newName);
