I just finished my second FrameMaker 10 ExtendScript webinar, which I enjoyed immensely. The first one was done in conjunction with Adobe, the second was sponsored by Carmen Publishing Inc. I would like to do more ExtendScript webinars and want to know what topics people are interested in. Please leave comments with suggestions for ExtendScript topics. Thank you very much.
7 thoughts on “ExtendScript Webinars: What Do You Want to Learn?”
I would like to learn how to create a script that gives end users a way to automate the import of graphics into technical manuals. At work, all of our graphics are stored on a server in a standardized folder structure with strict file naming and file type properties (all files are in PDF format). This seems like it would be an ideal opportunity for scripting and allow the users to simply type a file name in a dialog rather than having to manually navigate to the file location.
Hi Mike. This is a good idea for a script. The first thing you need is a list of tasks and questions surrounding this.
1) Given an image path, and insertion point in a document, import a graphic.
2) Prompt the user for a filename and add the known path to the front of it.
3) If there is more than one images folder, do you want to have a drop-down list of them in the prompt dialog box?
4) Determine what the document state should be in when the user runs the script. For example, do you require a text insertion point, a selected anchored frame, etc.?
Having a list like this helps you clarify your requirements and will give you a task list for developing each portion of the script. If you can fine tune this list (or make your own), we can go a bit further. Thanks for your contribution.
First, thanks for providing advice on this.
I should explain that the directory path to each graphic can be derived from the filename. All of the graphic file names have a prefix followed by a sequential number and are stored in folders that are groups of 100 files. For example, a file with the name MSP1234 would be stored at \\server\Graphics\MSP\MSP1000-1999\MSP1200-1299\MSP1234.pdf. MSP4321 would be stored at \\server\Graphics\MSP\MSP4000-4999\MSP4300-4399\MSP4321.pdf
I envision that the user will place the cursor where he wants the anchored frame to be inserted. Then, he presses a key combination to launch the script. A dialog is presented where the user enters the file name to import. The script will key off of the file name prefix and the first 2 digits of the sequential number to “build” the path to the file. Error checking would need to be done to ensure that file name entered by the user references a valid, existing graphic. The file is imported and inserted into the anchored frame.
1) Create a form for user input of the file name
2) Validate that the file name conforms to standard naming conventions and that the file exists.
3) Build the path to the file based on the file name
4) Create an anchored frame
5) Import the graphic and insert into the frame
6) Optionally resized the frame to the extents of the graphic
What would be the next step?
Hi Mike. Thanks for the clarification. Based on your description, I would rework the task list a bit.
1) Given a base file name, derive the correct path to the graphic. You need a function that will take the base name as an input and return the complete path as the output. You really can’t do step 2 of your list until you return the complete path; then you can see if the graphic exists.
2) Given a complete path name, and insertion point, import a graphic into FrameMaker. This really consolidates your steps 4, 5, and 6, since importing a graphic at the insertion point will automatically create an anchored frame to fit the graphic.
3) Create an input form. This is where you can add validation and ensuring that the graphic exists. You may even want to have a Browse option so that you can use the custom dialog box to browse for a graphic that doesn’t conform to your naming convention; for example to import a logo.
4) For simplicity, you may want to require an insertion point when you run the script. That way, you don’t have to deal with other situations like having no selection, or selected anchored frame.