• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Illustrator Folder.selectDialog

Engaged ,
Feb 18, 2022 Feb 18, 2022

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 ?

TOPICS
Scripting

Views

667

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Valorous Hero , Feb 18, 2022 Feb 18, 2022

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.

Votes

Translate

Translate
Adobe
Community Expert ,
Feb 18, 2022 Feb 18, 2022

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.

 

Best regards

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 18, 2022 Feb 18, 2022

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!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Feb 18, 2022 Feb 18, 2022

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 19, 2022 Feb 19, 2022

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines