This article is entitled "Binary JavaScript Embedment (CS4/CS5)."
Basically it shows how a JSXBIN can be pasted into a regular .JSX file
(with assorted #targetengine stuff) and then
executed with app.doScript([embedded jsxbinstring]);
Really freakin' cool. Naturally we do a #target photoshop and an eval([string]) instead:
- Code: Select all
#target photoshop
eval("@JSXBIN@ES@2.0@MyBbyBn0AEJAnASzKjTjUjSiQjSjFjTjFjUjTByBEjzIjMjPjDjBjMjJjajFCfRBFehMhEhEhEhPiBjQjQjMjJjDjBjUjJjPjOiQjSjFjTjFjUjTiGjPjMjEjFjShPiQjSjFjTjFjUjThdiQjSjFjTjFjUjTffnftJBnASzKjTjUjSiTjDjSjJjQjUjTDyBEjCfRBFehahEhEhEhPiQiTiCiJhPiBjVjUjPjNjBjUjFhPiJjNjBjHjFiQjSjPjDjFjTjTjPjShPiQjIjPjUjPjTjIjPjQhPiTjDjSjJjQjUjThdiTjDjSjJjQjUjTffnftJCnASzMjTjDjSjJjQjUjGjPjMjEjFjSEyBEjzGiGjPjMjEjFjSFfRBCzBhLGCGCGCGXzEjQjBjUjIHfjzDjBjQjQIfnneBhPVBfyBnnnneBhPVDfyBnnffnftJDnAEjzFjBjMjFjSjUJfRBXzIjGjVjMjMiOjBjNjFKfVEfyBffADB40BiAD4B0AiAE4C0AiAADAzALByB");
);
Testing it with photoshop cs4:
(jsxbin source code follows)
- Code: Select all
var strPresets = localize ("$$$/ApplicationPresetsFolder/Presets=Presets");
var strScripts = localize ("$$$/PSBI/Automate/ImageProcessor/Photoshop/Scripts=Scripts");
var scriptfolder = Folder(app.path+ '/' + strPresets + '/' + strScripts);
alert(scriptfolder.fullName);
What I did was export this tiny bit of javascript as a JSXBIN and then
re-opened it in ESTK. Then I removed the carriage returns, copied it, and
pasted it into quotes within the eval(). You try it.
Now, the big question is whether this would work in CS3. Clearly it works in
CS4, and seems to evade decoding (at least I don't feel like reverse
engineering it). And this method permits both the JSXBIN and the header
JSX to be in the same file.
