-
Get folder path and save the path in app.settings, and change the path when required
I need a small help on an After effects CEP panel script that I’m working on.
What I’m trying to achieve is,
1. If settings does not have a path – prompt user to select a folder. If path exists in setting:
1.1. Check if its a valid path (if path exists). If it does, continue as normal.
1.2. If path does not exist – prompt user to select a folder and save it to settings.
2. Create another button in UI to change the path.Attaching the Link to my project files:
https://drive.google.com/open?id=1TV40yER5wE3dIglGgSBNkccMlOpg0n69Much appreciated your time and your help.
function getProjectFolder(){
var targetFolder = Folder.selectDialog("Import Files From Folder");if (targetFolder){
app.settings.saveSetting("Test Settings","Project Path",targetFolder.path + "/" + targetFolder.name);
}
try{
var saveFolder = File(app.settings.getSetting("Test Settings","Project Path"));
}
catch (error){
}return saveFolder;
}
var myProjectFolder = getProjectFolder();
var path = myProjectFolder.path + "/" + myProjectFolder.name;
Sorry, there were no replies found.