Copy link to clipboard
Copied
Hi everyone,
Is there a script or action that will open the location of the Illustrator Scripts folder?
Hi Mike, I've only tested on Mac OS 11.5.2, but this snippet opens the folder that contains the current running script which will be the scripts folder if that's where you saved it.
File($.fileName).parent.execute();
Edit: to use this, save a text file in your scripts folder (actually whichever folder you want it to open), call it something like "Open Scripts Folder.js" and run it from Illustrator's scripts menu.
- Mark
Hi Mark, I think Mike wants to open the default scripts folder.
can you check if the below script works on Mac? Is your language "en_US"?
// open default scripts folder
// Carlos Canto
var aifolder = app.path;
var localizedFolder = Folder(aifolder + '/Presets.localized');
if (localizedFolder.exists) {
var presetsFolder = localizedFolder;
//alert(presetsFolder.fsName);
}
else {
var presetsFolder = Folder(aifolder + '/Presets');
//alert(presetsFolder.fsName);
}
if
...
Copy link to clipboard
Copied
Hi Mike, I've only tested on Mac OS 11.5.2, but this snippet opens the folder that contains the current running script which will be the scripts folder if that's where you saved it.
File($.fileName).parent.execute();
Edit: to use this, save a text file in your scripts folder (actually whichever folder you want it to open), call it something like "Open Scripts Folder.js" and run it from Illustrator's scripts menu.
- Mark
Copy link to clipboard
Copied
Hi Mark, I think Mike wants to open the default scripts folder.
can you check if the below script works on Mac? Is your language "en_US"?
// open default scripts folder
// Carlos Canto
var aifolder = app.path;
var localizedFolder = Folder(aifolder + '/Presets.localized');
if (localizedFolder.exists) {
var presetsFolder = localizedFolder;
//alert(presetsFolder.fsName);
}
else {
var presetsFolder = Folder(aifolder + '/Presets');
//alert(presetsFolder.fsName);
}
if (presetsFolder.exists) {
var scriptsFolder = Folder(presetsFolder + '/' + $.locale + '/Scripts');
if (scriptsFolder.exists) {
scriptsFolder.execute();
//alert(scriptsFolder.fsName);
//alert(scriptsFolder.getFiles('*.*').toString());
}
else {
alert('Scripts Folder was not found');
}
}
else {
alert('Presets folder was not found');
}
Copy link to clipboard
Copied
Hi Carlos, yes your script works perfectly on Mac OS 11.5.2 and locale is "en_US" ... although I live in Australia. 🙂
- Mark
Copy link to clipboard
Copied
oh ok, I didn't get that you had to install your script in the right folder first.
My version tries to find the Scripts folder.
thanks for confirming it works on Mac
Copy link to clipboard
Copied
So the goal would be this:
If I want to put a new script in the Scripts folder, I wonder if there is a convenient way of opening to the Scripts folder without having to memorize where that folder is? If a script could open to that very folder, then I could put the new script in quickly and easily.
Copy link to clipboard
Copied
Thanks Mark! At first I didn't understand what you wrote, but then I tried it, ... and it works! Once installed, it makes subsequent visits to that folder simpler and quicker! Many, many thanks to you!
Copy link to clipboard
Copied
Oops I should have made it clearer. You can call the script file something like "Open Script Folder.js". I'm glad you figured it out. 🙂
- Mark
Copy link to clipboard
Copied
Carlos, your script works, too! Once installed, I can forget where that folder is, but use the script to open that location more conveniently the next time I want to play with a script. I thank you, very much, as well!
🙂
Copy link to clipboard
Copied
you're welcome Mike, my script does not require installation, it can be placed anywhere. But if you know where the Scripts folder is and you just want to make it easy to find, Mark's script makes more sense.
Copy link to clipboard
Copied
actually if I had to constantly access the Scripts folder I would make a system shortcut to it 🙂
Copy link to clipboard
Copied
That is a work-around good thought, too. I was wishing for a convenience *inside* Illustrator. Thanks again for the help!