First of all, this is the very first script I'm attempting to write from scratch. I'm completely green at scripting, and I've picked up a few snippets from Adobe's ID scripting guide, but nothing has really stuck yet relating to this particular objective.
My supervisor keeps a master list of ad spaces, with the name of the account, how wide the space is, and how tall the space is, all in an Excel sheet. These spaces can number in the hundreds, and I am stuck manually drawing one rectangle for every space, which takes a very long time.
I'd like to create/have help creating a script that will take these values and "automagically" draw these spaces in the form of text frames, with the width (in columns) and the height (in inches) defined by the values in the master list, as well as the name of each account appearing in the subsequent text frames.
The script doesn't necessarily need to be able to pull the values straight from the Excel sheet; I can transfer the values to a support text file if needed, or directly into the script, changing it as I need it. A big thing (if it is not able to pull right from an Excel sheet) is that the number of spaces changes weekly, and so do the accounts, and the width and the height. Accordingly, it would be ideal if the values from the sheet could be changed easily, so as to create a new set of spaces as needed.
Positioning for each space is not crucial, only height and width. If they all appear on top of each other on the same page, that will be a result for me. The main idea is to not have to draw them all manually, one by one.
To me, this sounds like a tall order, but hopefully some experienced scripters out there can assist me, as I wish to become experienced as well.
So, the TL;DR version:
- Script needs to draw a series of text frames.
- Text frames dimensions need to be defined by width and height values from Excel sheet.
- Text frames must have account name as contents (from account names in Excel sheet).
- Accounts, width and height change every week in the Excel sheet, so must be relatively easy to exchange all of the values.
- The width values are on the Excel sheet as columns. It would be ideal if the script could convert those numbers into multiples of columns as needed.
- (Optional) Script can pull values directly from Excel sheet.
- (Optional) Script can define text frame fill color as gray. (If it works as I think it will, I could just select all the resulting text frames myself and set them all to gray at once... I'm not that lazy )
Thanks in advance to whomever can assist in any possible way, even if it is just a push in the right direction. This script will save 1-2 hours of tedium every week.