On this site you will find some helpful code snippets and links for the Scripting session of the MuTypography seminar. In the session we will write our first little scripts with the help of basil.js, a scripting library that allows for an easy entry into the world of InDesign scripting.
As the current official version of basil.js is somewhat outdated, please do not follow the installation instructions on the official website, but follow these steps instead:
- Create a folder named
basiljsin your system'sDocumentsfolder - Download this file and un-zip it to a file named
basil.js - Move this downloaded file into the new
basiljsfolder - Download the basil.js example scripts, un-zip the file and move the resulting folder into the
basiljsfolder as well
We also need a code editor to work in. Generally, there are many code editors to choose from, but to work with basil.js the best choice currently is to use Sublime Text 3. Please follow these steps, to download and setup Sublime:
- Download Sublime Text 3 and move it to your applications folder
- Download and un-zip these setting files, this will result in a folder named
Sublime Text 3 - Open Sublime, and then go to
Sublime Text -> Preferences -> Browse Packages - This opens a folder inside another folder, which is also named
Sublime Text 3 - Replace this
Sublime Text 3folder with the folder of the same name that you un-zipped before - Restart Sublime. If everything worked, you should see a white text window now, instead of the black text window from before
- You can now run basil.js scripts by hitting
ctrl + E
- basil.js v2.0 Reference (WIP)
- Typografie programmieren GitHub page, many scripts from basil.js seminar at HAW Hamburg
- basil.js example scripts
- basil.js typo() cheat sheet
- basil.js tag on Stack Overflow
- InDesign ExtendScript API by Gregor Fellenz
- InDesign automatisieren, book by Gregor Fellenz (German)
- HilfDirSelbst.ch Adobe InDesign Skriptwerkstatt (Forum)
- InDesign on Adobe Support Community (Forum)
- Coding Train – YouTube channel teaching p5.js and Processing, especially this playlist introducing p5.js to beginners
- Stack Overflow
- Codecademy – Introduction to JavaScript