CSTK In Adobe App Console and Development Tool

TrevorAdobe Extensions, Extensions, News, Productivity, Scripting, ScriptsLeave a Comment

CSTK version 2.1 is now available.

What's it's all about?
  • A JSX, JS and SHELL console you can user right inside to Adobe apps (Illustrator, InDesign, InCopy, Photoshop, Premiere Pro, After Effects).
  • A set of HTML extensions tools.
How to Use?
  • Mess around until you get the idea.
  • See the instructions on the GitHub page
  • Watch this video 👇

How to install?

The best method is described on the GitHub page so use that if you can.
If not you can download the extensions zip file here and plonk it in the extensions folder.
Or you can download the zxp file here and use an installer like this one (Do not double click the zxp file!).

What is this repository NOT for?

Text editing, developing projects & testing projects. Use an appropriate text editor and developing environment for that.

Any features?
  • An in Adobe CC app console for JSX, JSX and CMD / Bash.
  • This is convenient for checking out and changing DOM properties and testing out the JS compatibilities of a given app version.
  • The JSX console now shows useful error messages even with InDesign (Error, line# and source line)
  • The $.writeln() and $.write() and __log() __error() and __result() methods will output to the console and automatically stringify objects and arrays.
  • __result()

  • $.props() will give useful info on selected item or other target, see the GitHub page for details.
  • $.props()

  • __log('hi') works in both JSX and JS consoles can also include css and class __log('foo', 'background: yellow', 'error')
  • __error() same as __log() just with the error class applied (comes out red)
  • __result(err, result, stderr) useful for JS callbacks fs.someFunction('somethingHere', __result)
  • __jsx(message, resultStyle, resultClass, errorStyle, errorClass) useful for JS callbacks of jsx code jsx.evalScript('Math.random()', __jsx) will format result as depending on whether or not it is an error, custom css can be provided
  • __doc() in applicable apps (Illustrator & InDesign) jsx mode will refer the the current document, an optional document index can be provided
  • __sel() in applicable apps (Illustrator & InDesign) jsx mode will refer the the current selection, an optional selection index can be provided, these are useful shortcuts __sel() is quicker to type than app.selection[0]
  • From the JS console you can use Jfy(myObject) instead of JSON.stringify(myObject)
  • Can use some node modules without the need to require. (fs, exec, path, os, spawn)
  • The bash / cmd shell console is good where administrative rights are not needed on the Mac you can pipe a password into sudo using echo "your_password" | sudo -S -k see the answer of user393365 here before you do that.
  • Some useful Adobe HTML Extensions tools.
  • Easily open extensions in CefClient or Chrome for debugging
  • Debug Tools

  • Set debug and log levels
  • Easily open extensions with Finder / Explorer or your favorite text editor
  • Opens extensions log file and the log folder
  • Works of most of the Adobe CC apps (Including Ai, Ic, Id, Ps, Pp, Ae).
License

If you nick any snippets from the code please at least put a credit with a link to this page in your binary code.
Do not sue.
Do not complain.
Use with care.
No liability accepted NO MATTER WHAT.
Any disputes to be settled by my dad.
Copyright Trevor Creative Scripts

Final Note

Please judge me favorably. My annotations and general writing are much less sloppy when I get paid for what I'm doing!

Leave a Reply

Your email address will not be published. Required fields are marked *