About three years ago, I posted on this forum a question about creating a trusted function to save to a specific location. I cannot find the original post. I remember at that time I was looking for a way to save to the user's desktop folder which path changes from user to user. Somebody came up with this:
myGetPath = app.trustPropagatorFunction(function(v1,v2){
app.beginPriv();
return app.getPath(v1,v2);
app.endPriv();
});
myTrustedGetPath = app.trustedFunction(function(v1,v2) {
app.beginPriv();
return myGetPath(v1,v2);
app.endPriv();
});
safeSaveAs = app.trustPropagatorFunction(function(doc,vPath){
app.beginPriv();
doc.saveAs({cPath:vPath});
app.endPriv();
});
myTrustedSaveAs = app.trustedFunction(function(doc,vPath){
app.beginPriv();
safeSaveAs(doc,vPath);
app.endPriv();
});
After reading throught the API reference and this tutorial, I don't understand the difference between the trusted function and the trust Propagator function or why I need a trust propagator.
What I need now is to save to a predetermined folder so I guess I can drop the getPath part.