Quantcast
Channel: Adobe Community: Message List - InDesign Scripting
Viewing all articles
Browse latest Browse all 37788

Startup script to load shortcuts — in a Citrix environment

$
0
0

Let me offer a sample of what I have and ask if anyone knows how to fill in the gaps.

 

For starters, a listening script upon booting up InDesign:

 

#target InDesign

#targetengine session

 

//collect the 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 i = 0; i < startupScriptFiles.length; i++) {

    app.doScript(startupScriptFiles[i]);

    }

 

 

then the script itself:

 

#target InDesign

#targetengine session

 

 

//get or create folder for 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 for me and it's a hacked solution at best.  So I am wondering how to get it all to click.  In a Citrix environment (windows), Adobe puts the preferences in a hidden folder path ~/AppData/Roaming/   and this is where it's tough to find them — on the server(s) you land on.

 

Because you land on an arbitrary server, you have to run the getUser statement first, then drill down inside.  I realize I have mixed paths of  Mac & PC, and I'm really writing abiout a PC environment, but paths are interchangeable.  It's the script that counts.


Viewing all articles
Browse latest Browse all 37788

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>