Indesign Script Guide
Hi, I am new to Indesign Scripting, I need some Basic Scripting guide for XML and Non-XML automation,
Thanks for your response, I had collected the Scripting Resources from adobe.com,
And am looking for the scripting guides developed by other devlopers.
hope it’s funny but many programmers have its own documentation for scripting, It will helpful for beginners like me.,
Similar Messages
-
InDesign Scripting Guide/Apple Script
The command
set myTop to top of margin preferences of myPage
described in the InDesign Scripting Guide doesn't work with Indesign CS2. Does anyone can help?
ThanksHi Morenga 65,
Try:
tell margin preferences of myPage
set myTop to top
end tell
But, as Dave says, do come to the Scripting Forum--there's lots of good stuff there!
Thanks,
Ole -
Scripting Guide referenced scripts
All over the CS3 scripting guide there are parts of scripts and it says
in parentheses (for the complete script, see ...). Where do I find these
scripts that are being referenced to?Hi Fred,
You can download the scripts from here:
http://wwwimages.adobe.com/www.adobe.com/products/indesign/scripting/downloads/indesign_cs 3_guide_scripts.zip
Kasyan -
Scripts for CS6 Scripting Guide
The link in the PDF document "Adobe InDesign CS6 Scripting Guide:Javascript" is broken and I can't find the file with the example javascripts.
Can you help?
/fhttp://www.adobe.com/devnet/indesign/documentation.html
-
Hi, I see plenty of references in this forum to people scripting AME, but I can't find the promised doc for the AME-specific subset of Extend Script anywhere.
In the "Adobe Introduction to Scripting" pdf, in the section "More information about scripting", we are told:
"Each scripting language contains many more devices and techniques for adding power and complexity to
your scripts. To continue learning how to script your Adobe applications, please refer to the Adobe
scripting guide for your application."
Is there any such documentation?
If not, how do folk on this list work this out?
Many thanks
Peter@Jeff – don't know if there is a specific scripting guide for InDesign CC.
For news of new methods, properties and objects in the DOM (Document Object Model) in ExtendScript (Adobe's implementation of JavaScript) with InDesign see:
Marc Autret:
So What's New in InDesign CC Scripting DOM
http://www.indiscripts.com/post/2013/06/so-what-s-new-in-indesign-cc-scripting-dom
Another valuable reference (not covering CC but also InDesign CS6) is:
http://www.jongware.com/idjshelp.html
For learning ExtendScript you will find useful:
1. Learn about "core" JavaScript (there are plenty of useful courses floating around in the web)
2. Buy yourself a book like Grant Gamble's "InDesign CS5 – Automation Using XML & JavaScript"
and experiment with your own InDesign files and code snippets from that base on…
3. Find a collegue or some friends who also want to learn about it and do some learning sessions together
4. Visit this forum a lot and browse through older threads. Most threads are about ExtendScript.
Where did you hear that Adobe wants to phase out AppleScript on its products?
Flash based extensions and related to that "ActionScript" will be phased out next year for building Extensions for CC applications. It will be replaced with [HTML5, CSS and JavaScript] for building widgets. PhotoShop CC will be the first product where we will see this (maybe around mid 2014); others will follow.
Maybe you read about the abbreviation "AS" in this regard; which for some people is "AppleScript" and for some people it is "ActionScript". Don't confuse the two scripting languages.
Uwe -
CS3 Scripting Guide AppleScript
Shane Stanley wrote:
> No, I have no financial link with Script Debugger, but I do think that
> trying to script without it is a bit like having one hand tied behind your
> back.
>
> We've talked of doing AppleScript Pro Sessions in Amsterdam, but alas
> nothing has come of it so far. Ray did do a session for Apple over there a
> couple of years back.
Okay, I'll download the Script Debugger demo at some point and give it
a run, but I'd better stick to one thing at a time at this point considering
how long it's taking me just to get through the ID Scripting Guide. I have,
however, managed to get beyond Chapter 2, and have renamed this topic
accordingly.
Thanks,
RoyShane Stanley wrote:
> BOMs tend to matter only when you're moving stuff between systems
> using
> different endian processors, eg Intel vs PPC. It's a pity in a way
> that BOMs
> aren't used more widely, but much of the industry seems stuck in
> good-enough
> mode with ASCII variants. if you're not seeing text get garbled,
> you're
> fine.
I did get some garbled text the other day, but I don't think it was a
BOM issue. Setting the TextWrangler encoding preferences for Little-
Endian seems to occasion some problems, mainly undesired alerts, so I
changed them back to Western (Mac OS Roman). As far as I can remember,
I needed Little-Endian only for doing something with ID tagged text
that I'm now done with for the time being.
Hey, here's one I managed to do on my own:
tell application "Adobe InDesign CS4"
activate
set myDocument to make document
set myMarginPreferences to margin preferences of myDocument
set bottomMargin to bottom of myMarginPreferences
set bottomYPoint to (page height of document preferences of
myDocument) - bottomMargin
set rightMargin to right of myMarginPreferences
set rightXPoint to (page width of document preferences of myDocument)
- rightMargin
tell page 1 of myDocument
set myTextFrame to make text frame with properties {geometric bounds:
{top of myMarginPreferences, left of myMarginPreferences,
bottomYPoint, rightXPoint}}
select insertion point -1 of myTextFrame
end tell
end tell
I suppose that's what you'd call trivial, but I didn't have it before
and now I do - assigned to cmd-n, understandably.
It wasn't easy for me and I blew too much time on it. I think the main
problem was that I kept hitting this point:
tell application "Adobe InDesign CS4"
activate
set myDocument to make document
set myMarginPreferences to margin preferences of myDocument
tell page 1 of myDocument
set myTextFrame to make text frame with properties {geometric bounds:
{top of myMarginPreferences, left of myMarginPreferences, (page height
of document preferences of myDocument) - (bottom of
myMarginPreferences), [...]}}
at which it would keep telling me:
Canât make «class marb» of «class impp» of document "Untitled-
[n]" of application "Adobe InDesign CS4" into type number.
I couldn't figure out what was going on there, and still can't. There
wasn't any problem with top of myMarginPreferences. bottom of
myMarginPreferences had to be a number, in order to work with top of
myMarginPreferences which evidently was text, and, uh... confused again!
Oh... top of myMarginPreferences is text, while
page height of document preferences of myDocument is a number, right?
If so, that doesn't seem to be intuitively evident, exactly.
Thanks,
Roy -
Need help in Indesign scripting - Javascript
Hi
I have few questions during the indesign scripting.
Please help me to answer those
1. Targetting two engines.
How to target Illustrator engine when the javascripts is running in indesign engine.
2. Creating text in textframe
How to create a text in textframe and uniquely identifying it for further updation of content of text.
3. Creating form fields in Indesign
How to create form fields in indesign through javascript so that after exporting to PDF it can be modified.
4. Access method
How to access methods defined in start up script from the our own cript folder.
Thanks
Karthik B1. I have No Idea what you mean. Do you want an InDesign script "target" illustrator? Try Brigdetalk.
2. Described in the Javascript Tools guide.
3. No amount of scripting will make #3 possible. [*] If you "desperately" need this, write a plugin for it.
4. I'm not sure, but as far as I know nothing special is needed for that. At least, not if your own script shares the same engine. If it doesn't, then there is no way because that's how it is supposed to work, and no amount of scripting can work around that.
[*] Apart from writing a complete PDF engine in Javascript, that is. Based on your other questions, it's a fair bet that's not going to happen any time soon. -
[ID CC] Is there a specific scripting guide for CC?
Hi,
I was looking for the scripting guide (both applescript and Javascript) for ID CC, but all I see is the CS6 version. Is that normal? I know there isn't that much new between the two version, but it would be nice to have the updated guides.
Also, I had heard that the Applescript language was going to be fased out. Meaning, no new feature would be supported and things that changed would break current code in future version of the software. Is there any thruth in this? I'm a fairly novice applescripter and I can't even read Javascript, so I was wondering if I need to try to learn Javascript ASAP or if I'll be able to go by with my applescript.
Thanks for any input.
Jeff@Jeff – don't know if there is a specific scripting guide for InDesign CC.
For news of new methods, properties and objects in the DOM (Document Object Model) in ExtendScript (Adobe's implementation of JavaScript) with InDesign see:
Marc Autret:
So What's New in InDesign CC Scripting DOM
http://www.indiscripts.com/post/2013/06/so-what-s-new-in-indesign-cc-scripting-dom
Another valuable reference (not covering CC but also InDesign CS6) is:
http://www.jongware.com/idjshelp.html
For learning ExtendScript you will find useful:
1. Learn about "core" JavaScript (there are plenty of useful courses floating around in the web)
2. Buy yourself a book like Grant Gamble's "InDesign CS5 – Automation Using XML & JavaScript"
and experiment with your own InDesign files and code snippets from that base on…
3. Find a collegue or some friends who also want to learn about it and do some learning sessions together
4. Visit this forum a lot and browse through older threads. Most threads are about ExtendScript.
Where did you hear that Adobe wants to phase out AppleScript on its products?
Flash based extensions and related to that "ActionScript" will be phased out next year for building Extensions for CC applications. It will be replaced with [HTML5, CSS and JavaScript] for building widgets. PhotoShop CC will be the first product where we will see this (maybe around mid 2014); others will follow.
Maybe you read about the abbreviation "AS" in this regard; which for some people is "AppleScript" and for some people it is "ActionScript". Don't confuse the two scripting languages.
Uwe -
I'm trying to find the moved location of the InDesign zip archive of the scripts shown in the InDesign_ScriptingGuide_JS.pdf.
Adobe lists this link in the pdf as
http://www.adobe.com/products/indesign/scripting/index.html.
but it just takes you to their InDesgin CC page.
ThanksTry going down the page and in one of the side list is a link
Resources
Adobe Exchange
Adobe Configurator
Developer Center
Automating InDesign
Custom editorial publishing solutions
Creative Suite Printing Guide
Print production
Click on the Automating InDesign and then the Scripting Resources. -
Photoshop Scripting GuideのP181の間違い?
Photoshop Scripting GuideのP181でPDFOpenOptionsオブジェクトのプロパティと設定できる値の一覧がありますが、
OpenDocumentMode.GRAYSC
OpenDocumentMode.ALE
となっているのは
OpenDocumentMode.GRAYSCALE
の間違いではないかと。Hallo again,
alright, I've finally managed to write up some documentation and put up a repository on GitHub. You can check out the website for Phrame.js where you can download the latest version and read through the documentation. Or you can just fork Phrame.js on github. Keep in mind: this is still an -alpha release-.
Reading through the doc will explain how the framework works, but not what it's capable of. I'm planning on writing a tutorial somewhere in the feature, but first I'd like to take a break and relax a little
I've (quickyly) tested this framework in Photoshop, InDesign and Illustrator, so the framework SHOULD work platform independantly.
So, as stated before: feedback would be greatly appreciated and if you have any requests, feel free to contact me.
Cheers,
p. -
How to Run Indesign Script in a file from plugin code in CS4?
Hi,<br />I have the code to execute the InDesign script stored in external file for InDesign CS3.<br /><br />InterfacePtr<IScriptManager> scriptManager(Utils<IScriptUtils>()->QueryScriptManager(kJavaScriptMgrBoss)); <br />InterfacePtr<IScriptRunner> scriptRunner(scriptManager, UseDefaultIID()); <br /> IDFile scriptFile(scriptFilePath); <br /> if (scriptRunner->CanHandleFile(scriptFile)) <br /> { <br /> ScriptData returnValue; <br /> PMString errorString; <br /> ErrorCode error = scriptRunner->RunFile(scriptFile); <br /> ASSERT(error == kSuccess); <br /> } <br /><br />But the RunFile() method is cs4 expects an additional argument of the type RunScriptParams. <br />Someone please show me with a code snippet on how to excute a script file in CS4??
Dear Ian
Here I'm used the below coding in CS3, Its working fine....
//In CS3 Coding
PMString jsFullPath("c:\\windows\\sample.jsx"); // a path to my java script file
do
const
IDFile outFile(jsFullPath);InterfacePtr<IScriptManager> scriptManager(Utils<IScriptUtils>()->QueryScriptManager(kJavaScriptMgrBoss));
ASSERT( scriptManager ) ;
InterfacePtr<IScriptRunner> scriptRunner(scriptManager,UseDefaultIID());
ASSERT( scriptRunner ) ;
if(scriptManager){
InterfacePtr<IScriptRunner>scriptRunner(scriptManager,UseDefaultIID());
RunScriptParams params(scriptRunner);
ErrorCode err = scriptRunner->RunFile(outFile, kTrue, kFalse);
while(kFalse);
But the same time I used this coding in CS4, Its not woking
//In CS4 Coding
PMString jsFullPath("c:\\windows\\MacID\\BIN\\sample.jsx"); // a path to my java script file
do
const
IDFile outFile(jsFullPath);InterfacePtr<IScriptManager> scriptManager(Utils<IScriptUtils>()->QueryScriptManager(kJavaScriptMgrBoss));
ASSERT( scriptManager ) ;
InterfacePtr<IScriptRunner> scriptRunner(scriptManager,UseDefaultIID());
ASSERT( scriptRunner ) ;
if
(scriptManager){
InterfacePtr<IScriptRunner>scriptRunner(scriptManager,UseDefaultIID());
RunScriptParams params(scriptRunner);
ErrorCode err = scriptRunner->RunFile(outFile, params);
while(kFalse);
I changed the "RunFile" arguments also
RunScriptParams params(scriptRunner);
ErrorCode err = scriptRunner->RunFile(outFile, params);
But Still I'm facing the problem in InDesign CS4. That's mean "Adobe InDesign CS4" shout down for serious error happend.
Please kindly help me, for solving this problem.
Thanks & Regards
T.R.Harihara Sudhan
Message was edited by: Adobe-InDesign CS4 -
How do I handle Style Groups in InDesign Scripting?
Hi,
I am relatively new to InDesign scripting.
I'm trying to map Paragraph Styles to CSS, and it seemed to be working fine, till I came across Style Groups -
Styles belonging to a group are identified as - Root Style Group name : Child style group name : ...... : Style name
Because of this paragraph style <Style name> was not mapping to the TOC style <Root Style Group name : Child style group name : ...... : Style name> and my TOC styles were not correctly mapping.
I wrote a fix for this in my app, by fetching parent groups and appending to a string - which i check in the TOC style entries.
Before calling this a FIX, I need to confirm if there are any more hierarchies/represnetations that could be used to represent a Paragraph Style as a TOC style? I don't want to see that a week later I discover something like <Style : Nested paragraph style> as a TOC style and then I'd have to fix my fix!
Thanks.Hi,
If YourPara is a paragraph style in myDoc and defined inside group of styles named myStGroup
you can refer to it using:
myDoc.paragraphStyleGroups.item("myStGroup").paragraphStyles.item("YourPara");
Jarek -
Hello, I would like to know if it´s possible to communicate with Adobe Professional through a Indesign script (.jsx). I need to convert the pdf file that I export from Indesign to specific standard type that is only available in Adobe Professional.
I want to save the Indesign generated file with Adobe Professional and obtain the pdf that I particularly need.
I would like to know if there is a way to do this.
Thank u,
PeterThat's nothing!
An engineer and I contacted Adobe technical support by phone to ensure the PC I was having custom built was configured to its optimum. They advised XP64 as the best operating environment. After that discussion we had to completely revise procurement, etc to get the bits and compatible XP64 compatible software, putting the build project back a few weeks as well, Imagine how I laughed when I found out on one of these forums that XP64 is the worst choice and totally unsupported by CS4!
I have written to Shantanu Narayen, Adobe CEO and didn't even get an acknowledgement I raised this last week on the Adobe stand at BVE and was told they'd get someone to contact me asap but guess what, niet...! To be fair there has been one Adobe executive that recognises the problem and the damage poor customer support is causing the company; he has been as helpful as he can. Unfortunately, it seems the overall Adobe culture at the top is "get the money and run". If your problem goes beyond what's already on their web pages, tough luck!
Regards,
Graham -
Call Photoshop script from Indesign script CS4 JS
Hi, I open Photoshop linked file from InDesign in Photoshop and I need same InDesign script to run Photoshop script on the file. How I can call the Photoshop script from InDesign script.
Thank you very much for your help.
YuliaThank you, Kasyan.
800 lines of script is little be intimidating.
What we are trying to achieve is to open jpgs in Photoshop and resave them as tiffs and replace same jpg with corresponding tiff in Indesign as it was placed before.
Is there a way to call Photoshop from Indesign through appleScript.
I have most of the script done for Indesign and I have Photoshop shript ready that saves jpgs as tiffs done. I am only missing the part where I can call this existing Ph. script from Indisign.
We prefer not to use BridgeTalk if possible, because we have a lot of programs open and running in the same time, and would like to avoid to open one more program (BridgeTalk).
Thank you very much for your great help.
Yulia -
I am new in indesign scripting, please tell me how to write a script to get content of a element in xml and then sort all the content
Hi,
May the below code is useful for you, but I dont know how to sort.
Edit the tag as per your job request.
alert(app.activeDocument.xmlElements[0].contents)
//Second alert
var xe = app.activeDocument.xmlElements[0].evaluateXPathExpression("//marginalnote");
alert(xe.length)
for(i=0; i<xe.length; i++)
alert(xe[i].texts[0].contents)
Regards
Siraj
Maybe you are looking for
-
Is it possible in BAPI to ignore a reqd field in table while uploading data
Dear SAP Guru's, A GL account had "allow posting without tax code" unchecked, which meant that tax code had to be specified in order to post balances/data in that GL account. But during cutover, while uploading balances using BAPI, the conversion tea
-
How to use case when statements in ODI
I need to put conditional logic before DVM look up in ODI. In the expression editor I put the following statement:- CASE WHEN POC_JOURNAL_TEMP_SOURCE_TBL.APPLICATION_NAME='RCS' THEN POC_JOURNAL_TEMP_SOURCE_TBL.APPLICATION_NAME=EBIZ_CELL.CELL_DATA WHE
-
Grouping and expanding objects
This question was posted in response to the following article: http://help.adobe.com/en_US/illustrator/cs/using/WS714a382cdf7d304e7e07d0100196cbc5f-62c7a .html
-
All of a sudden, my search will not work and my mailboxes (VIP and Smartmailboxes) will not populate. Any clues how to fix?
-
Problem with Serializable JDO objects containing Hashtables
Hi, I have a simple JDO object which contains a Hashtable and I would like to declare as Serializable. It seems though, that whenever I serialize this object, I get a NullPointerException. I've written a bare-bones test case and reproduced the except