var myJavaScript = "app.scriptArgs.setValue(\"ScriptArgumentA\", \"This is the first script argument value.\");\r";
myJavaScript += "app.scriptArgs.setValue(\"ScriptArgumentB\", \"This is the second script argument value.\")";
var myScriptArgumentA = app.scriptArgs.getValue("ScriptArgumentA");
var myScriptArgumentB = app.scriptArgs.getValue("ScriptArgumentB");
alert("ScriptArgumentA: " + myScriptArgumentA + "\rScriptArgumentB: " + myScriptArgumentB);
if(File.fs == "Windows"){
var myVBScript = "Set myInDesign = CreateObject(\"InDesign.Application.CS3\")\r";
myVBScript += "myInDesign.ScriptArgs.SetValue \"ScriptArgumentA\", \"This is the first script argument value.\"\r";
myVBScript += "myInDesign.ScriptArgs.SetValue \"ScriptArgumentB\", \"This is the second script argument value.\"";
2: Scripting Features Working with Script Labels 8
app.doScript(myVBScript, ScriptLanguage.visualBasic);
}
else{
var myAppleScript = "tell application \"Adobe InDesign CS3\"\r";
myAppleScript += "make script arg with properties{name:\"ScriptArgumentA\", value:\"This is the first script argument value.\"}\r";
myAppleScript += "make script arg with properties{name:\"ScriptArgumentB\", value:\"This is the second script argument value.\"}\r";
myAppleScript += "end tell\r";
app.doScript(myAppleScript, ScriptLanguage.applescriptLanguage);
}
var myScriptArgumentA = app.scriptArgs.getValue("ScriptArgumentA");
var myScriptArgumentB = app.scriptArgs.getValue("ScriptArgumentB");
alert("ScriptArgumentA: " + myScriptArgumentA + "\rScriptArgumentB: " + myScriptArgumentB);