There is a thread some place about how to make an ebook return to last page opened when re-openedI can't find the thread
The previous version on this forum works in 4.00 and 4.01, but does NOT work in 4.20 if security is set to high
The following will work in 4.00, 4.01 and 4.20
1. Make a text file called start.as in your source folder (say using Notepad). Insert the following:
INIREAD('sv1','ans2000.ini','{esbn}','Bookmark{compilerversion}')
STRREPLACE('sv1','{sv1}','/',' ')
STRLASTWORD('sv1','{sv1}')
STRFIND('sv2','{sv1}','.htm')
SET('sv3',0)
IF({sv2}<>0)
FILEEXIST('sv3','{ebook}\__enc_{sv1}')
IF({sv3})
NAVIGATE('{sv1}')
ELSE
FILEEXIST('sv3','{ebook}\{sv1}')
IF({sv3})
NAVIGATE('{sv1}')
FILEEXIST('sv3','{ebook}\{sv1}')
ENDIF
ENDIF
ENDIF
There are two underscores before __enc_ and one after
2. Make a text file in your source folder called exit.as, containing
SET('sv1','{ebookurl}')
STRFIND('sv2','{sv1}','__')
IF({sv2}=0)
INIWRITE('{sv1}','ans2000.ini','{esbn}','Bookmark{compilerversion}')
ENDIF
3. Implement bookmark
EITHER
To make a book return to last page opened
In Edit Add-Ins
On Start put #!start.as
On Exit put #!exit.as
OR
To make a bookmark and return links
- To mark a page put <A HREF="#!exit.as">Bookmark this page</A> in the HTML code
- To return to a page put <A HREF="#!start.as">Return to bookmark</A> in the HTML code
OR
To set starting page of ebook
In Edit Add-Ins
On Start put #!start.as
- To mark a page put <A HREF="#!exit.as">Bookmark this page</A> in the HTML code
4. LIMITATIONS
- Doesn't work well with frames. This is because bookmark is of entire frameset rather than the frames. Same problem as bookmarking a Framed Internet site
- Do NOT include spaces in names of your HTML files. The above script doesn't handle this...