How to automatically return to the last page viewed when an e-book is closed and reopened
Overview
This script saves the current position in an e-book when the e-book is closed. When the e-book is later reopened, the e-book will automatically return to the saved position.
Requirements Instructions - This script saves the current location within the e-book. Copy and paste this code into a plain text file (created for example using Notepad) and save the file as setmark.as, then place setmark.as into your source folder.
Please note: If using Notepad on a version of Windows prior to Windows XP, when you save in Notepad, be sure to place the file name in quotes on the Save As dialog box, i.e. "setmark.as" otherwise Notepad will add .txt to the end of the name (giving a file name of setmark.as.txt). If using Notepad on Windows XP, this workaround is not necessary.
- This script returns to a previously saved bookmark. Copy and paste this code into a plain text file (created for example using Notepad) and save the file as gomark.as, then place gomark.as into your source folder.
Please note: If using Notepad on a version of Windows prior to Windows XP, when you save in Notepad, be sure to place the file name in quotes on the Save As dialog box, i.e. "gomark.as" otherwise Notepad will add .txt to the end of the name (giving a file name of gomark.as.txt). If using Notepad on Windows XP, this workaround is not necessary.
- Click Add-Ins... on the Edit menu in the compiler.
- For On Start insert the following code
- For On Exit insert the following code
Notes - This script has been tested with Activ E-Book Compiler versions 4.00, 4.01, 4.20, 4.21 and 4.22 (4.22 is the latest version at the time of writing). It is possible that changes might be required for e-books made with subsequent versions.
- Limitation: The script has not work well with e-books that use frames. The reason is that the book will always be of the frameset rather than the contents of individual frame windows.
- Limitation: This script will not function correctly if you use spaces in HTML file names.
|
|