I’ve been watching this new feature in Mac OS X since it was introduced. Here is a post from Telerik discussing the basic features.
Really interesting that Apple is making Javascript a first-class citizen.
I’ve been watching this new feature in Mac OS X since it was introduced. Here is a post from Telerik discussing the basic features.
Really interesting that Apple is making Javascript a first-class citizen.
I need to become more proficient in Javascript. I took a request from a friend and created this.
Below is a link to a very basic script that will do the following:
The end result can be seen below.
The naming scheme allows the user to repeat the process since each ‘action’ creates a unique directory.
Note that this is not a packaging mechanism. None of the linked files or fonts are brought together.
Installation
Notes
Tested with CS6, CC on a Mac
Getting the script
Below is a link to the script.
One of our partners asked if Enterprise had a feature that allowed the user to check out all of the articles that were attached to a layout in one move.
Answer: No
BUT…we do have our friend javascript AND in addition to that we have ‘Before’ and ‘After’ Events for the Enterprise plugins
So, the script below can be used in one of two ways.
Add the script to the Script Panel in InDesign and when the user WANTS to check out all of the articles…use the script by running it.
Or it could be tied to ‘AfterOpenLayout’ event. This would check out all of the article every time a layout was checked out.
You decide.
//////////////////////////////////////////////////////////////////////////////
// Script: Checkout articles on layout
// Language: JavaScript
// Author: jag
// Company: WoodWing USA
// Date: 18 January 2010
//////////////////////////////////////////////////////////////////////////////
// Description: When this script is invoked it will check out all of the articles
// attached to the targeted layout
//////////////////////////////////////////////////////////////////////////////
try
{
// Identify the current document
var doc = app.documents.item(0);
// Access the document’s articles
var mas = doc.managedArticles;
//Count the number of managed articles
var countOfManagedArticles = doc.managedArticles.count();
if ( countOfManagedArticles > 0)
{
for( var i = 0; i < countOfManagedArticles; ++i)
{
var getTheMetaData = doc.managedArticles.item(i).checkOut();
}
}
} catch( e)
{
desc = e.description;
num = e.number;
alert( “Check out article script error ” + num + “: ” + desc );
}