Last active
September 21, 2018 06:47
-
-
Save Trevor-/55297356e5728f57c2225df16a8e8b0e to your computer and use it in GitHub Desktop.
Demo for running remote scripts on InDesign. Shares vars and arguments with "local" script. See 1st comment for link to "local" script.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//////////////////////////////////////////////////////////////////////////////////////// | |
// For InDesign but can easily be adapter for some other apps // | |
// Show methods of sharing vars etc. between local and remote scripts // | |
// By Trevor http://creative-scripts.com 21 Sep 18 // | |
// This is the "remote" script // | |
// The "local" is at https://gist.github.com/Trevor-/a5de06d41e28936ad72fe3e348bddd33 // | |
//////////////////////////////////////////////////////////////////////////////////////// | |
// "aVarFromLocalToRemote" is set in the "local" script | |
alert("Got " + aVarFromLocalToRemote); | |
var aVarFromRemoteToLocal = "Trevor - http://creative-scripts.com"; | |
var scriptArg1 = app.scriptArgs.getValue("scriptArg1"); | |
var envVar1 = $.getenv("envVar1"); | |
function blah(bar, baz){ | |
var result = bar + " " + baz; | |
alert(result); | |
return result; | |
} | |
blah(scriptArg1, envVar1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is the remote script for InDesign.
The "local" script for Mac / Windows is here
See the annotations there for adapting as per needs.
See https://forums.adobe.com/message/10632451#10632451 for background.