Startup script to load shortcuts — in a Citrix environment


let me offer sample of have , ask if knows how fill in gaps.

 

for starters, listening script upon booting indesign:

 

#target indesign

#targetengine session

 

//collect name of current user

var username = getuser();

function getuser() {

var myuser = ($.os.substring(0, 7)=="windows")

  ? $.getenv("username")

  : $.getenv("user");

return myuser;

}

 

 

// var startupscriptsfolder = "/z/scripting/startup scripts/";

var startupscriptsfolder = "/applications/adobe indesign cc/scripts/startup scripts/";

var startupscriptfiles = folder(startupscriptsfolder).getfiles();

 

 

for (var = 0; < startupscriptfiles.length; i++) {

    app.doscript(startupscriptfiles[i]);

    }

 

 

then script itself:

 

#target indesign

#targetengine session

 

 

//get or create folder script preferences

var scriptprefsfolderpath = "/users/madmac55/library/preferences/adobe indesign/version 9.0/en_us/indesign shortcut sets/";

if (folder(scriptprefsfolderpath).exists == false) {

        folder(scriptprefsfolderpath).create();

    }

var locationprefsfilepath = scriptprefsfolderpath + "/ myshortcuts.indk";

 

 

this hasn't worked me , it's hacked solution @ best.  wondering how click.  in citrix environment (windows), adobe puts preferences in hidden folder path ~/appdata/roaming/   , it's tough find them — on server(s) land on.

 

because land on arbitrary server, have run getuser statement first, drill down inside.  realize have mixed paths of  mac & pc, , i'm writing abiout pc environment, paths interchangeable.  it's script counts.

hey mac,

 

i'm not sure if work i've used when making .bat files... but, in windows, can reference folder directly using variable "%username%"

 

c:\users\%username%\appdata\roaming\adobe\indesign\version 5.0\scripts\scripts panel\

 

hope helps.



More discussions in InDesign Scripting


adobe

Comments

Popular posts from this blog

how to devide a circle into equal parts

"Could not fill because there are not enough opaque source pixels" - not solved by any other thread

Why can't I change the billing info for my account?