Does anyone know if there is a way to get a users path to their install directory?
I have script, that creates a new menu item when Indesign starts up. the menu item is clicked, it opens another script.
Right now, I have the path to the second script hardcoded, which works fine:
C:\Program Files (x86)\Adobe\Adobe InDesign CS5.5\Scripts\Scripts Panel\DM_Core\DM_RemoveMenu.vbs
but now I have to give this to other users, and I need to know if there is some way to get the installation path that they have to their indesign.
Ultimately, what I would like to get is this:
C:\Program Files (x86)\Adobe\Adobe InDesign CS5.5\Scripts
I have tried scriptsFolder but that doesn't take me to the right place.
Anyone have any ideas.
Thanks,
Where did you get "scriptsFolder" from? Your current scripts' folder?
Anyway, check how far you come with the standard list: http://jongware.mit.edu/idcs5js/pc_Folder.html
These variables get filled by ID with the correct paths; for anywhere else, you're own your own. Make sure your path is valid under both Mac OS X and under Windoze, as there are a few differences.
This should get you what you want:
function GetScriptsFolder (){
var scriptsFolder = null;
do{
// On Mac this is a folder inside the app package
var appFolder = Folder.startup;
if (! appFolder.exists){break;}
scriptsFolder = Folder(appFolder + "/Scripts");
while (appFolder.exists && ! scriptsFolder.exists){
appFolder = appFolder.parent;
scriptsFolder = Folder(appFolder + "/Scripts");
}
if (! scriptsFolder.exists){
scriptsFolder = null;
break;
}
}
while (false);
return scriptsFolder;
}
Harbs
North America
Europe, Middle East and Africa
Asia Pacific