Skip to content

Examples for learning the basics of Adobe ExtendScript @FH-Potsdam with a focus on InDesign

License

Notifications You must be signed in to change notification settings

ff6347/extendscript-101

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

extendscript-101

Examples for learning the basics of Adobe ExtendScript @FH-Potsdam with a focus on InDesign and graphics.

For more extendscript examples see github.com/fabiantheblind/extendscript

##prerequisites

  1. Learn some javascript basics e.g. here @ codecademy
  2. Install InDesign via creative cloud download
  3. Choose your editor. Adobe has a own editor called the ExtendScript Toolkit (ESTK). You can download it here or install it via the creative cloud application. On CS 3 till CS 6 it normally got installed right away. You can use a different editor if you like. This document assumes you use the ESTK.
  4. Check ot the Adobe Scripting Center for more Tutorials and examples. Download the InDesign Scripting SDK for your operating system.
  5. Open or unpack the SDK. take a lock at the folder: indesign > scriptingguide > scripts > JavaScript. There you will find a lot of examples provided by Adobe.
  6. Find your "Scripts Panel" within InDesign and the corresponding folder on your harddrive. See this help topic for further information.
  7. Move the exendscript-101 folder and the whole SDK to your "Scripts Panel" folder.
  8. Create a file called "hello-world.jsx" in the "Scripts Panel" folder and add the following code to it var doc = app.documents.add(); doc.pages[0].textFrames.add({geometricBounds:[0,0,100,100],contents:"hello InDesign"});
  9. In InDesign. Go to Menu > Windows > Utilities > Scripts (Actually we are in Germany. So localized it is: Menü > Fenster > Dienstprogramme > Skripte ). It should look something like this. /assets/images/Scripts-Panel.png
  10. Execute the script from within InDesign. You should get a new document with a text frame and some text in it.
  11. Paste the same code into the ESTK.
  12. select the target application (InDesign) from the pulldown menu on the top.
    pulldown
    Don't safe it, just hit the ► (play/run) button on the top right.

    You should get the same result as before.

Congratulations. You have your setup right. So lets move on to some more advanced topics.

##01 polygons-rectangles-ovals.jsx

##02 graphiclines.jsx

##03 text.jsx

##04 swatches.jsx

##05 selection-and-groups.jsx

Copyright (c) 2014 Fabian "fabiantheblind" Morón Zirfas & FH-Potsdam
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

see also http://www.opensource.org/licenses/mit-license.php

About

Examples for learning the basics of Adobe ExtendScript @FH-Potsdam with a focus on InDesign

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published