Quantcast
Channel: Adobe Community : Popular Discussions - Illustrator Scripting
Viewing all articles
Browse latest Browse all 12845

choose folder default location

$
0
0

Hi,

 

I've been searching the forum to try and a way to allow a user to choose a folder from a default location. I thought I had found the solution but it's not quite working as I wanted:

 

#target illustrator

 

 

//Example 1

var output_folder = Folder.selectDialog ('Choose PDF output folder.');

 

 

//Example 2

var myFolder=Folder(app.activeDocument.path).selectDlg("Choose PDF output folder:");

 

If I use the code in example 1 the choose folder dialog appears and the 'Open' button is available and when I press the button the location is chosen as expected. However if I use the code in example 2, although the choose window opens in the path of the active documents location the 'Open' button is not able to be pressed until I select a folder., which means that the chosen location is not correct. I should indicate that I'm running this code on a Mac.

 

Does anybody know a way to have a choose folder dialog window specify a location and be able to select that.

 

Thanks,

Nik


Viewing all articles
Browse latest Browse all 12845

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>