% % generate the source image and text jsx % % % stack: [ img1-root . . . ] img-count % result-dir src-root-dir template-file % % create the .jsx for image and template sourcing % % % start with the Template name and defs for the source text and image arrays % tojsquo ^" Template = " &"; SourceText = []; SourceImage = []; " % % function header for invoking sources % ^"function Sources() { " % % establish constants for source and target paths % % stack: [ img1-root . . . ] img-count % result-dir src-root-dir builder % &" ListCount = " &4 &"; SourcePath = " exch tojsquo & % % stack: [ img1-root . . . ] img-count % result-dir builder % &"; TargetPath = " exch tojsquo & js&; % % stack: [ img1-root . . . ] img-count builder % % create image var and assignment for files % 0 !counter exch % % stack: [ img1-root . . . ] builder img-count % countdown { % % stack: [ img1-root . . . ] builder img-index % + -1 roll % % stack: [ img1-root . . . ] builder next-img-root % tojsquo "SourceImage[" _counter & &"] = " ^ &"; SourceText[" &_counter &'] = ""; ' % % stack: [ img1-root . . . ] builder data-js % & +:counter } for % % stack: builder % % % save as Sources.jsx in Desk &" } " "Sources" jsx!desk % % prefix the inclusion header and invocation of Templating % "//+Templating //* Sources(); OrigTem(); if (Templater) { Templating(" "out_" &_Xact.Style quoter & &"," "xactgenr" quoter & &"); } " % % perform assembled jsx in Photoshop % *phocperf % % record the templating values % empty "Xact" sval "Xact.Style" sval "Xact.StyleNum" sval