Software Articles

March 5, 2011

Any Experienced User Can Master InDesign Scripting

Filed under: InDesign, JavaScript — Tags: , , , , — admin @ 12:56 am

InDesign is widely acknowledged as the industry standard in print and publishing software. It has a huge range of functions and a large base of users, many of whom have an in depth knowledge of the program. Anyone who uses the program regularly, especially those who use it for fairly challenging tasks, will welcome the ability to automate some of their workflows. However, there is no easy way of achieving this in InDesign.

The recordable actions facility found in Photoshop and Illustrator simply does not exist in InDesign. Instead, InDesign allows the user to write executable scripts using a choice of three programming languages: JavaScript, AppleScript or Visual Basic. The major benefit of using JavaScript as the programming language is that it is cross-platform: scripts will run equally well on Windows and Macintosh.

For anyone working in a Mac-only environment, AppleScript will be the obvious language of choice. It offers the benefit of easy integration with scripts written for automating other programs on the Macintosh platform, for example, extracting information from FileMaker and then taking it into InDesign.

For anyone interested in automating InDesign on the Windows platform, Visual Basic is the logical choice. Additionally, it is possible to control InDesign using Visual Basic for Applications (VBA), a variant of Visual Basic which is used to automate Microsoft Office. This option would be ideal for someone automating the production of financial reports heavily reliant on Microsoft Excel spreadsheets.

Be forewarned that, in order to be able to control the program with scripting, you must know InDesign CS5 very well. This is essential; since it is impossible to understand many of the subtleties of the InDesign object model without an intimate knowledge of the elements of InDesign which these scripting objects represent. Basically, in order to automate InDesign, you need a good knowledge of three elements. Firstly, InDesign: the program and all its major functions. Secondly, a compatible scripting language such as JavaScript. Thirdly, the InDesign object model: the programming syntax which is used to represent every nook and cranny of InDesign itself.

InDesign CS5 Automation Using XML & JavaScript by Grant Gamble is available now from Amazon.

February 25, 2011

InDesign Scripting With The ExtendScript Toolkit

Filed under: Computers — Tags: , , , , , — admin @ 12:55 am

ExtendScript is the Adobe implementation of JavaScript which is used to automate the Adobe Creative Suite. The ESTK is an ExtendScript editing utility which contains a number of useful features; however, there is nothing to stop you using your favourite code editor instead. The ESTK development environment now resembles a standard Adobe application with everything in its usual place; which makes it fairly easy to get used to.

Panels are docked on the right and are hidden or made visible by choosing their names from the Window menu. The arrows for Collapse to Icons and Expand Dock work as they do in the Creative Suite programs.

On the right of the menu bar is a drop-down menu containing preset workspace names which, when chosen, automatically rearrange the floating panels into a given configuration. If you come up with an arrangement of panels which you find ideal, you can save it by choosing Create New Workspace from the workspace drop-down menu in the top right of your screen.

The ESTK can display line numbers: an essential feature when working with programming code. This feature can be activated or deactivated by choosing View – Line Numbers or by using the keyboard shortcut: Control-Shift-L on Windows; Command-Shift-L on Mac.

It also offers the colour-coded highlighting of syntax, whereby the colour of words and statements confirms their role within the code: for example, JavaScript keywords are shown in blue and fixed text strings (inside quotation marks) in burgundy.

Another useful feature is Code Collapse whereby the program automatically displays buttons for hiding and revealing blocks of code. This feature simplifies navigation in longer scripts: you can temporarily hide lines as an alternative to constantly having to scroll past them to get to another part of your script. This feature can be activated and deactivated by choosing View – Code Collapse. The program automatically recognizes blocks of code and places a minus-sign icon at the start of each block. If you click on the minus-sign icon, the entire block is hidden and replaced by a horizontal line. The minus-sign icon then changes to a plus-sign. To reveal the hidden block once more, click on the plus-sign icon.

If you have used any of the Microsoft code-editing tools such as the Visual Basic Editor used to create macros in Microsoft Office, you will be familiar with the concept of intelliSense, whereby the code editor offers you a list of context-sensitive options as you enter keywords. By choosing an option from the list, you avoid making syntax errors and you don’t spend so much time looking things up. Adobe Dreamweaver offers a virtually identical feature called code hinting. The ESTK also has an auto completion feature. However, it falls far short of the equivalent features found in Dreamweaver and the Microsoft editors. When you type certain words, lists of suggestions do appear; but they are not very closely targeted to the code you are entering. However, when you are learning a new programming language, every little helps; so why not try it and see what you think. This feature is activated by default: if you wish to deactivate it, choose Edit – Preferences (Windows) or ExtendScript Toolkit – Preferences (Macintosh). Click on the Help category on the left of the Preferences dialog then uncheck the option Enable Auto Completion.

InDesign CS5 Automation Using XML and JavaScript by Grant Gamble

November 9, 2010

Making Sense Of Histograms In Photoshop CS5

Filed under: Computers — Tags: , , — admin @ 1:31 am

The Histogram panel in Adobe Photoshop CS5 (Window – Histogram) offers an overview of the tonal range of an image. The histogram is basically a chart which shows how many pixels are present at each luminosity value, with dark pixels on the left and lighter pixels on the right. If no selection is made, the histogram reflects all the pixels in the image. It is also possible to select just part of an image and use the histogram to examine the distribution of pixels just within the selected area. If the image consists of multiple layers, Photoshop displays a pop-up menu which allows you to choose either “Entire Image” or “Selected Layer” to determine which pixels are included in the output shown in the histogram.

A lot of photographs which were shot in average lighting and which contain a variety of colours will have a bell-shaped curve with the most pixels in the middle of the histogram and the number of pixels gradually tailing off in the lighter area to the left and right.

Obviously, the whole point of photography is that it can feature any subject, be shot under different lighting conditions and have different artistic aims. Thus, for example, if an image deliberately has a lot of white: say a white sofa against a white wall, the histogram will have a peak on the left with pixels tailing off in the middle and right. In the context of this image, the skewed shape of the histogram is perfectly healthy. Similarly, if you look at the histogram of a photograph shot at night, don’t be surprised to see a very lopsided chart with most of the pixels on the right… So how do you use the histogram to spot tonal problems in an image?

Histograms are particularly good at detecting whether an image lacks contrast. Images that lack contrast have a histogram where the number of pixels tails off to zero or close to zero in the brightest and darkest parts of the image. Such images tend to have a dull, muddy appearance.

Perhaps the easiest way to correct the problem of an image that lacks contrast is to use the Levels command. Choose Image – Adjustments – Levels and, in the Levels dialog, drag the right triangle over to the right to the position where the pixel distribution falls to nothing. Next, drag the left triangle which represents the white point of the image over to the right to where the pixels disappear. When you click OK, you will notice that the image has a lot more contrast and sharpness.

Adobe Photoshop CS 5 training courses.

Powered by WordPress