Did you know that you can change active tool through scripting? YES, YOU CAN, and it’s so easy! This is new option in InDesign CS5 scripting, and it’s so cool! You can even retrieve current tool name, hint, icon file! It’s really great feature! So, let’s look how to do it!
Great InDesign feature is that we can fill empty text box with ‘Placeholder text’. That’s very handy when we have to create template, but we don’t have text. There are few scripts for InDesign that allow us to insert different types of text, but this is my favorite: Change placeholder text by luxlucid. Also, there is very good website for creating placeholder text: Dummy Text Generator! So, let’s get started!
Well, this one is really awesome! I was playing with finding positions of selected text, baseline and stuff, and I came to great idea! What if I want to draw polygon around selected text? Can it be done through scripting?! Well, I tried, and I think I was successful! It’s little bit complicated, but I learned a lot! So, let’s get started!
If we want to extract clipping path from InDesign GUI we simply go to Object -> Clipping Path -> Covert Clipping Path to Frame, but how to do it through scripting? Another thing is that we can’t convert multiple selected images with clipping path to frames through GUI, but you can do it through script. I will cover just converting one selected frame, but we can loop through selection and do same to every image.
I think that title already says everything about this post and I’ll try to be short. When you are exporting from InDesign GUI you have option to export just selected objects, but how to achieve this from script? This script is also published on Adobe’s InDesign scripting forum.
There are few useful properties you maybe want to use when copy/paste objects and text in InDesign. You can change them through preferences, but also through scripting.
Like you probably know, InDesign can move/duplicate pages within document through scripting, but you can also move/duplicate pages between documents! I found this snippet on Adobe’s InDesign scripting forum, and I tested it and it works just fine!
Few days ago, on Adobe’s InDesign scripting forum I found something very interesting. It was great little function for number conversion from Decimal to Roman numbers. But it wasn’t I enough so I tried to reverse functionality. Functions are converted to ‘prototypes’ for easier usage.
Two days ago on Adobe’s InDesign scripting forum I found interesting question about creating custom menu, so I decided to dig little deeper and see how to achieve desired effect. I went to Marc Autrets site, and post How to Create your Own InDesign Menus. I tried to create custom menu that will be inserted into InDesign’s main menu, with three menu items, and one separator.
We are going to look at simple way to get all text variables. Important thing is that InDesign had two different lists of text variables. One list is stored in ‘app’ object, and another is in ‘document’ object. This is very important to remember! Part of this script was published on Adobe’s InDesign scripting forum by Peter Kahrel. So, let’s get started.
Few months ago on Adobe’s InDesign scripting forum question was asked about getting all font styles from selected font. I want to share my way for doing this. It involves two prototype Array functions, and nothing else. For this example I created small window for selecting font family. So, let’s get started.
I’ve made small simple script for exporting document to PDF using preset we select. We will see how to list PDF Export Presets we have available, select output file, and export file. So, let’s get started!
Sometimes we want to have full day/month name instead of just numbers. Here is really short little snippet to achieve this result. This post also can be found on Adobe’s InDesign scripting forum.
There is good way to store data within document elements. We can store very long text data into almost every element within InDesign. Data is only visible through scripting, and also can be set just through scripting. This is great way to carry document specific data everywhere we go, because data we set is saved into document. So, let’s see how we can use this great feature.
Yesterday we had example how to read IP/Gateway with help of VBscript. Todaw we will try to get Adapter info and MAC address. On some systems, I don’t know why, but adapters are duplicated, so you can later convert values to array, and delete unwanted ones.
Are you frustrated with lack of History palette in InDesign? Did you know that you can retrieve undo/redo commands from script? Yeah! That’s right! It’s really easy to achieve History palette functionality with some easy script. I created really simple dialog with two drop-down boxes and undo/redo buttons. Let’s first how to get list of undo/redo commands that we have available.
For many years I worked just with CorelDRAW and one thing I really liked and I used to was changing cursor key keyboard increment. Unfortunately InDesign doesn’t allow me to change that setting, without going into Preferences. So, I decided to try to create script, with simple dialog box where I can input number, and change setting. This was my very first InDesign script
Here is short script for selecting multiple rows in table. This will create ‘visible’ selection. This script is also published on Adobe’s InDesign scripting forum but I found some parts on other sites too.
Do you have lot of libraries? You need to open them but you are tired of searching right folder and stuff? This is simple and effective solution for opening libraries that are located in same folder. This script is published on Adobe’s InDesign scripting forum by me Also, you can build it in some bigger script/dialog.
This is very great and handy script! If you have lot of text or numbers, regular alert dialog just roll text out of the screen, and you can’t see them. Here is an example from “ScriptUI for Dummies”, which is a more useful version of alert: it shows text in a scrollable window. An additional advantage is that you can copy text out of the alert. This was posted on Adobe’s InDesign scripting forum.
This is short one, but I use it in some of my scripts. Sometimes, script just hangs, or crashes, and if we used windows in script, they are not destroyed! They are still in memory and they will be there until we close InDesign. But, there is way to destroy all dialogs that are left in memory.
Few weeks ago someone asked on Adobe’s InDesign scripting forum how to change ‘greek below’ settings through script, and I want to share it here also. This time, it’s my snippet As you probably know there are three ‘Display performance’ settings and ‘greek below’ can be set separately for each ‘Display performance’ settings.
Guides are very good helpers when you work but sometimes we want to get rid of all guides. It’s easy when you have few pages, with one layer, but if you have 100+ pages, with hundreds of guides, it can become a pain to remove all of them.
This is one of things that I’m missing in InDesign! When you have selection, there is no way to see how many objects do you have selected! Even ‘Info Panel’ doesn’t show object count! But, there is easy way to achieve this with scripting. Of course you can use this in your script to loop through all selected objects for example.
Like I said in previous post, ‘Find colored words‘, we will create swatches selector. This is not my script, and I will credit author on the end of this post. You can find this post on Adobe’s InDesign scripting forum. So let’s get started.
Let’s say you have script and you need to create loop, but, loop count depends on special color word count. Here is little snippet for counting words in color of your choice.
In-Tools just released very cool FREE scripting panel for entire Creative Suite 5! You can do much more that with built-in script panel for InDesign, and also you get scripting panels for Photoshop and Illustrator! So, hurry to http://bit.ly/9soSN2 and try it today!
This is not my script, but I find it really handy! It searches through all links in document and finds just embedded links and push them into Array.