ExtendScript of the Week : Restore Window

Tuesday, January 10 2012 @ 9:22 AM, By navneet

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

Information about the Scripts :

      • 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 it even more powerful

Regards,
Navneet Goyal
FrameMaker Engineering Team

(Resources: Restore Window )

COMMENTS

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

    Navneet,

    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  

      Hi Michael

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

      ~Navneet

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

    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.

  • Categories

  • Archives

  • Authors

  • Useful Links

  • Recent Comments

    • Joel: Thanks for fixing the links guys!
    • Maxwell Hoffmann: Ted, one aspect of the blog that may have escaped your notice; you can launch the HTML5 version in...
    • Maxwell Hoffmann: Joel, per comments made above, I discovered that the original URLs were incorrect with pointers to...
    • Maxwell Hoffmann: Paul, as I indicated in the comments below, the original blog had links that pointed to a...
    • Maxwell Hoffmann: I apologize to all concerned regarding my suggestion to “clear the cache” … it...