BOOK.IO Lite v6.0.5 Quick Reference

Fast lookup guide for common tasks and namespace API


Namespace Quick Access

$.global.BOOKIO.finder       // Find compositions, layers, folders
$.global.BOOKIO.color        // Convert and apply colors
$.global.BOOKIO.layer        // Modify layer properties
$.global.BOOKIO.layout       // Control positioning and aspect ratio
$.global.BOOKIO.project      // Manage project organization
$.global.BOOKIO.render       // Set up rendering
$.global.BOOKIO.json         // Load and cache JSON data
$.global.BOOKIO.log          // Log messages and handle errors
$.global.BOOKIO.config       // Initialize configuration
$.global.BOOKIO.utils        // General utilities
$.global.BOOKIO.sanitize     // Input sanitization and validation

Finding Things

Find a Layer

var layer = $.global.BOOKIO.finder.layer(comp, "Layer Name");

Find a Composition

var comp = $.global.BOOKIO.finder.composition(app.project, "Comp Name");

Find or Create a Folder

var folder = $.global.BOOKIO.finder.orCreateFolder(parentFolder, "Folder Name");

Find with Multiple Names

var layer = $.global.BOOKIO.finder.layerWithNames(comp,
    ["Title", "Title Layer", "BookTitle"]);

Colors

Convert Hex to RGB

var rgb = $.global.BOOKIO.color.hexToRgb("#FF0000");
// Returns [1, 0, 0]

Convert RGB to Hex

var hex = $.global.BOOKIO.color.rgbToHex(1, 0, 0);
// Returns "#ff0000"

Apply Background Color

$.global.BOOKIO.color.applyBG(layer, "#FFFFFF");

Apply Font Color

$.global.BOOKIO.color.applyFont(layer, "#000000");

Layer Operations

Set Opacity

$.global.BOOKIO.layer.setOpacity(layer, 75);

Set Text

$.global.BOOKIO.layer.setText(textLayer, "Hello World");

Set Slider Value

$.global.BOOKIO.layer.setSlider(layer, "Slider", 50);

Get Slider Value

var value = $.global.BOOKIO.layer.getSlider(layer, "Slider");

Layout

Set Aspect Ratio

$.global.BOOKIO.layout.setAspectRatio(layer, 1.5);

Set Blocking Opacity

$.global.BOOKIO.layout.setBlockingOpacity(precompLayer, 50);

Set Title-Safe Opacity

$.global.BOOKIO.layout.setTitleSafeOpacity(precompLayer, 25);

Set Arrows Position

$.global.BOOKIO.layout.setArrowsY(precompLayer, 540);

Logging

Log Levels

$.global.BOOKIO.log.debug("Debug message", "moduleName");
$.global.BOOKIO.log.info("Info message", "moduleName");
$.global.BOOKIO.log.warning("Warning message", "moduleName");
$.global.BOOKIO.log.error("Error message", "moduleName");
$.global.BOOKIO.log.fatal("Fatal message", "moduleName");

Set Log Level

$.global.BOOKIO.log.setLevel("DEBUG");

Handle Error

try {
    // Code that might fail
} catch (e) {
    $.global.BOOKIO.log.handleError(e);
}

Rendering

Filter Files

var pngFiles = $.global.BOOKIO.render.filterFiles(fileArray, ".png");

Calculate Scale

var scale = $.global.BOOKIO.render.calculateScale(2400, 1200);
// Returns 50

Setup Render Queue

$.global.BOOKIO.render.setupQueue(comp, "/path/to/output/", settings);

Import Sequence

$.global.BOOKIO.render.importSequence(folder, "/path/to/sequence/");

Add Drop Shadow

$.global.BOOKIO.render.addDropShadow(layer, shadowSettings);

Add Markers

$.global.BOOKIO.render.addMarkers(comp, markerData);

JSON Operations

Load JSON

var data = $.global.BOOKIO.json.load("/path/to/file.json");

Get Status

var status = $.global.BOOKIO.json.getStatus();
if (status.connected) {
    // Bridge is connected
}

Cache Data

$.global.BOOKIO.json.cache(jsonData, "cacheKey");

Update UI

$.global.BOOKIO.json.updateUI(jsonData, uiElements);

Configuration

Initialize Configuration

var config = $.global.BOOKIO.config.initialize();

Initialize Media Config

var mediaConfig = $.global.BOOKIO.config.initializeMedia();

Access Configuration

var version = $.global.globalVersion;
var fps = $.global.fps;
var mediaTypes = $.global.mediaTypes;
var aspectRatios = $.global.aspectRatios;

Input Sanitization

Validate Path

var result = $.global.BOOKIO.sanitize.validatePath(userPath);
if (!result.isValid) {
    $.global.BOOKIO.log.error("Invalid path: " + result.message);
}

Normalize Path

var normalized = $.global.BOOKIO.sanitize.normalizePath("C:\\Users\\File.txt");
// Returns "C:/Users/File.txt"

Check Path Within Base

var isAllowed = $.global.BOOKIO.sanitize.isPathWithinBase(path, baseDir);

Sanitize Filename

var safe = $.global.BOOKIO.sanitize.filename("Book/Title: Special*Edition");
// Returns "Book_Title_Special_Edition"

Sanitize AE Text

var safeText = $.global.BOOKIO.sanitize.aeText("Line 1/Line 2");
// "/" converted to line break

Validate Hex Color

var result = $.global.BOOKIO.sanitize.hexColor("#F00");
if (result.isValid) {
    var hex = "#" + result.sanitized; // "#FF0000"
}

Validate Number

var value = $.global.BOOKIO.sanitize.number(userInput, 0, 100, 50);

Module Registry

Check Module Loaded

if ($.global.BOOKIO.isModuleLoaded("module_name")) {
    // Module is ready
}

Get Module Registry

var modules = $.global.BOOKIO.getModuleRegistry();

Get Dependency Report

var report = $.global.BOOKIO.getDependencyReport();
$.writeln(report);

Constants

Layer Names

$.global.COMPS.BOOK_COVER       // Composition name
$.global.LAYERS.TITLE           // Layer name
$.global.PROPS.OPACITY          // Property path
$.global.EFFECTS.DROP_SHADOW    // Effect name
$.global.FOLDERS.RENDERS        // Folder name
$.global.FILES.CONFIG_JSON      // File name
$.global.LAYOUT.CENTER_X        // Position constant
$.global.COLORS.BLACK           // Color value
$.global.UI.PANEL_WIDTH         // UI constant

Common Workflows

Update a Composition

var comp = $.global.BOOKIO.finder.composition(app.project, "BookCover");
if (!comp) {
    $.global.BOOKIO.log.error("Composition not found");
} else {
    var titleLayer = $.global.BOOKIO.finder.layer(comp, "Title");
    if (titleLayer) {
        $.global.BOOKIO.layer.setText(titleLayer, "New Title");
        $.global.BOOKIO.layer.setOpacity(titleLayer, 100);
        $.global.BOOKIO.log.info("Title updated");
    }
}

Create Project Structure

var rendersFolder = $.global.BOOKIO.finder.orCreateFolder(
    app.project.rootFolder,
    "Renders"
);
var imagesFolder = $.global.BOOKIO.finder.orCreateFolder(
    app.project.rootFolder,
    "Images"
);
var nextNum = $.global.BOOKIO.project.getNextCompNumber(rendersFolder);
$.global.BOOKIO.log.info("Next comp number: " + nextNum);

Apply Colors

var layer = $.global.BOOKIO.finder.layer(comp, "Title");
if (layer) {
    $.global.BOOKIO.color.applyFont(layer, "#FFFFFF");

    var bgLayer = $.global.BOOKIO.finder.layer(comp, "Background");
    $.global.BOOKIO.color.applyBG(bgLayer, "#000000");
}

Setup Rendering

var comp = $.global.BOOKIO.finder.composition(app.project, "BookCover");
if (comp) {
    $.global.BOOKIO.render.setupFolders("/path/to/output");
    $.global.BOOKIO.render.importSequence(comp, "/path/to/images/");
    $.global.BOOKIO.render.setupQueue(comp, "/path/to/output/", {});
    $.global.BOOKIO.log.info("Render queue ready");
}

Error Handling

try {
    $.global.BOOKIO.log.setLevel("DEBUG");
    var comp = $.global.BOOKIO.finder.composition(app.project, "Test");

    if (!comp) {
        throw new Error("Composition not found");
    }

    $.global.BOOKIO.log.info("Process completed successfully");

} catch (error) {
    $.global.BOOKIO.log.error("Process failed: " + error.message);
    $.global.BOOKIO.log.handleError(error);
}

Key Files

File Purpose
00UT_00_bootstrap.jsx Namespace initialization
00UT_03_error_handler.jsx Logging system
00UT_01a_finder.jsx Finding elements
00UT_01b_color.jsx Color operations
00UT_01c_layer_props.jsx Layer manipulation
00UT_01d_layout.jsx Layout controls
00UT_01e_project_org.jsx Project organization
00UT_01f_render_utils.jsx Render operations
00UT_04_json_bridge.jsx JSON data handling
00CF_01_config.jsx Main configuration
00CF_02_media_config.jsx Media configuration
00CF_03_layer_constants.jsx Layer constants

Troubleshooting

“BOOKIO is undefined”

// Solution: Bootstrap must load first
// Check: 00UT_00_bootstrap.jsx is included before other modules

“Function not found”

// Solution: Check function name in NAMESPACE.md
// Example: findLayerByName → $.global.BOOKIO.finder.layer

“Layer is null”

// Solution: Check layer name spelling
// Verify: Layer exists in composition
var layer = $.global.BOOKIO.finder.layer(comp, "ExactName");
if (!layer) {
    $.global.BOOKIO.log.error("Layer not found");
}

“Color not applied”

// Solution: Verify color format
// Use hex: "#RRGGBB" or "#RGB"
$.global.BOOKIO.color.applyFont(layer, "#000000"); // Correct

Tips and Best Practices

  1. Always check for null before using found layers
    var layer = $.global.BOOKIO.finder.layer(comp, "Name");
    if (layer) { /* use layer */ }
    
  2. Use logging for debugging
    $.global.BOOKIO.log.debug("Current value: " + value);
    
  3. Wrap error-prone code in try/catch
    try { /* code */ } catch(e) { $.global.BOOKIO.log.handleError(e); }
    
  4. Access configuration before use
    var config = $.global.BOOKIO.config.initialize();
    
  5. Use constants for consistency
    var comp = $.global.BOOKIO.finder.composition(app.project, $.global.COMPS.BOOK_COVER);
    

  • NAMESPACE.md - Complete API reference
  • ARCHITECTURE.md - System design and modules
  • MIGRATION_GUIDE.md - Updating from old function names
  • CLAUDE.md - ExtendScript JSX coding guidelines

Version: 6.0.5 Last Updated: January 2026


Back to top

BOOK.IO Lite - After Effects Automation Tool

This site uses Just the Docs, a documentation theme for Jekyll.