After long time here comes new post about InDesign scripting! 😀
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! 😀
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.
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. 😀