Go to Recordable Macro section Go to PCRE Search tutorial Go to JavaScript section Go to Perl section Go to C section (get it?)
Lingo
  • Good ol’ Macromedia Director!
JavaScript
  • .jsf command files in Fireworks
  • .js action files in photoshop (.jsx in CS2)
  • JSFL automation language in Flash, etc.
Don’t count out Director!
  • Mature product, cross-platform
  • Excellent ability to work with file system; Xtras further extend this ability
  • Wicked fast, handles most any media type (both advantages over Flash)
  • Even older versions are useful!
Case Study: Course Builder
  • Creates folders & organizes files
  • Imports and formats text & graphics
  • Exports thumbnails of completed pages
  • All within Director (EXAMPLE: proTools.dir)
Extending Director
  • www.updatestage.com (Gretchen Macdowell)
  • Mile High Table O'Products™ (many free)
  • Director-based tools need just a few Xtras:
  • Buddy API or free FileXtra for file access
  • Free SharpExport Xtra for saving image files
Case Study: Reader for existing CD courses - Problem
  • Current course CDs have audio & slides but no transcript
  • Transcriptionist needs interface to view slides/videos, listen to audio, and enter in transcript for each slide
Case Study: Reader for existing CD courses - Solution
  • Manually analyze disc structure & data files
  • Use Director to parse data files and display course media & transcript text entry fields
  • Use Director to save formatted transcripts
Case Study: Reader for existing CD courses - Advantages
  • Works with all existing CDs or data folders
  • Fast, cross-platform
  • Easy to add extra features (slider for slowing down/scrubbing audio)
  • EXAMPLE: Course viewer (demo at MIT talk)
Fireworks: better batching through JavaScript
  • File => batch process... for single-image batch
  • Click "Save script" button to save as .jsf
  • The resulting .jsf can be used as starting point for your own scripts
  • Download Extending Fireworks 8 (covers all versions, not just v.8) to help you do this
Fireworks Scripting Guide
Case Study: 3 exports from each batch image
  • Single batch script for large images, smaller images, and thumbnails
  • Coded to automatically add cute slide frames around the thumbnail images
  • Download script for Mac/Windows: fireworks_make-multi-JPEGs.jsf.zip (5k)
Case Study: recreating usable source files - Problem
  • 3000+ GIFs to recreate
  • Source PSDs are often inaccurate or missing
  • Need new, standardized, layered PNG of each image, with different versions on different named frames
Case Study: recreating usable source files - Solution
  • Use Fireworks .jsf to create batch that will be run on one set of GIFs
  • Find & import PSD based on GIF name
  • If no PSD present, add layers & frames based on existing GIF states
  • EXAMPLE: demo of a project-specific script in MIT talk
Photoshop: Actions with more action
  • Photoshop's scripting system has much better documentation & examples
  • Guides are installed with the application
  • In Photoshop’s "Scripting Guide" folder
cs1_scripting.jpg cs_scripting.jpg
Case Study: I hate to type - Problem
  • Hundreds of text slides saved as GIFs
  • Original PSD may or may not be present or accurate; may contain text for several slides
  • Can’t bear thought of retyping
Case Study: I hate to type - Solution
  • Use JavaScript to export PSD text to XML
  • Create Flash or Director interface to read in XML & display all text blocks from PSD (in the original position & size from the PSD)
  • Allow user to simply click on relevant text blocks to recreate text slide
Case Study: I hate to type - Download
  • Exclusive! Download photoshop_parse-PSD-text.js for converting Photoshop text to XML
  • In Photoshop, go to File->Scripts->Browse... and select photoshop_parse-PSD-text.js
  • Choose a folder of Photoshop files to parse (may contain subfolders)
  • Click "Yes" to save individual XML files for each PSD file that has text layers
  • Click "No" to save a single XML file that includes all PSD files with text layers
  • In both cases, the resulting file will have XML nodes for each text layer, named with the layer name
  • All font, size, color, and position info is saved as a style for each text layer
Continue on to Code Orange: Perl Section -->