Copy link to clipboard
Copied
Hi
I have an Illustrator script for exporting artboards as jpg
The problem is that the script "Folder.selectDialog" at illustrator is different than the native "save for web" and very dificult to choose the desired folder.
The same "Folder.selectDialog" calling fron Photoshop script is different ( and easier to find the desired folder)
1) Native Illustrator > Export > Save for web
2) Illustrator Script "Folder.selectDialog"
3)Photoshop Script, "Folder.selectDialog"
Any ideas if illustrator "Folder.selectDialog' can be altered-improved ?
You can try to do a fake file like this, which lets a user select a fake file to save to, and then use that file's parent, the folder?
var fakeFile = File("NAS/folder/thefile.psd");
var fakeFileChoice = fakeFile.saveDlg("Put any name, it doesn't matter, jsut pick a folder!");
if (fakeFileChoice) {
alert(decodeURI(fakeFileChoice.parent.toString());
}
This may or may not work to bypass the undesirable native Select Folder dialog.
Copy link to clipboard
Copied
Hi,
It can't be altered or modified as it is predefined.
It may differ in look from OS to OS or even app to app.
Copy link to clipboard
Copied
Thank you for the info!
Unfortunately i cannot select my nas folders from this dialog...
"\\MYFILESSERVER2\files\"
With save for web, or from a photoshop script i can!
Copy link to clipboard
Copied
You can try to do a fake file like this, which lets a user select a fake file to save to, and then use that file's parent, the folder?
var fakeFile = File("NAS/folder/thefile.psd");
var fakeFileChoice = fakeFile.saveDlg("Put any name, it doesn't matter, jsut pick a folder!");
if (fakeFileChoice) {
alert(decodeURI(fakeFileChoice.parent.toString());
}
This may or may not work to bypass the undesirable native Select Folder dialog.
Copy link to clipboard
Copied
It works!
(without the decodeURI part)
var fakeFile = File("//Fileserver/tempfolder/temp.jpg");
var fakeFileChoice = fakeFile.saveDlg("Put any name, it doesn't matter, jsut pick a folder!");
if (fakeFileChoice) {
alert(fakeFileChoice.parent.toString();
}
changed the alert to variable
var myFolder = fakeFileChoice.parent.toString();
Its a nice trick, but it will be so easier if the native folder dialog was like the file select dialog!
Thank you @Silly-V