ExtendScript of the Week: Restore Window


This week in “ExtendScript of the Week” initiative we will showcase an ExtendScript which restores the window location, zoom and other display settings available under View menu of the FrameMaker document. This script demonstrates how to use ExtendScript to retrieve display specific document properties and apply these settings on other FM document.

Information about the Script

  • ZIP file contains script file and sample .ini files. RestoreWin.jsx loads the menu and calls the function to execute the work flow. All function definition is present in this script file.
  • The script works on FM/MIF document in both structured and un-structured FrameMaker.
  • Script creates two initialization files AutoRestore.ini and Restore.ini in AppData location.
  • Script creates a new menu “Restore Window” which has three commands “Save Current State”, “Restore State” and “Auto-Restore”.
  • “Save Current State” command saves the display and zoom settings of active document in Restore.ini. It always delete the previously saved settings and re-create .ini file.
  • “Restore State” command retrieves the saved settings and apply on the active document.
  • “Auto-Restore” command toggles the automatic restoring On and Off. When enabled, saved window settings will get applied on active document automatically.

Steps to Install

  • Download the zip file from Restore Window
  • UnZip the file and Place “RestoreWin.jsx in startup folder located at “C:\Program Files\Adobe\AdobeFrameMaker10\startup”

How to use the Script

  • Launch FrameMaker
  • Open a Frame document
  • New menu “Restore Window” will get created with three commands.
  • Click on “Save Current State” to save the current display settings.
  • Click on “Restore State” to apply the saved settings on active document.
  • Click on “Auto-Restore” to toggle On/Off auto-restore functionality.

I hope this will prove useful to many folks and you can add extra functionality as per your requirements to these scripts to make them even more powerful

Navneet Goyal
FrameMaker Engineering Team

(Resources: Restore Window)

ExtendScript, FrameMaker

Posted on 01-10-2012


  • By Chris - 10:08 PM on August 17, 2012   Reply

    Didn’t work for me. I wanted to be able to reopen a book file and have the previous page size, zoom setting, and window location preserved. Didn’t happen. Thanks for creating the script, though. This should be a standard feature. I believe it used to be a few releases ago.

  • By Michael Müller-Hillebrand - 11:53 AM on January 10, 2012   Reply


    I would like to control whether a document is floating or docked, is that possible, too?

    – Michael

    • By Navneet Goyal - 1:15 PM on January 10, 2012   Reply

      Hi Michael

      We can’t perform document docking and un-docking using script.


Join the discussion