Archive

This one is really cool and handy. Simply select files and script will load them directly into PlaceGun tool! Really simple and handy! Also there are some options that you can set while loading files into PlaceGun, but we will just focus on simple loading. One more thing. InDesign CS5 DOM introduced new class that is directly connected to PlaceGun. It has some more options like: abortPlaceGun and rotate among others. So, let’s get started! 😀

Rate this:

In JavaScript I always miss one great feature from MySQL and that is operator between. It checks if a number is between two numbers you enter. So I decided to create small ‘Number’ prototype to achieve this. If a number is between is between then it returns true, and if not returns false. It’s perfect for using in ‘if()’ statements.

Rate this:

How to check if a number is even or odd? We can use Modulus operator (%), which returns the remainder of a division operation. If you divide some number by two, a remainder of 0 indicates an even number, while a remainder of 1 indicates an odd number. Best and easiest way is to create ‘Number’ prototype.

Rate this:

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. 😀

Rate this:

Very often we need to round some numbers, and Javascript has function to round numbers, but sometimes it’s not working very good. Luckily we can round number through math functions. First, let’s see how to use built-in Javascript functions. This script was also published on Adobe’s InDesign scripting forum. I collected some more info’s and combined them all into this post.