Make your own free website on Tripod.com
 
 
 Tips & Trix
Make a Bookmark for your book
Home
PUBz
Grafx Pax
Tips & Trix
Neo-Linx
Neo-Talk
Neo-Filez
Search NeoDezign
...
For goodness sake don't Dog-Ear the pages in that Book! Make a Bookmark. Not from construction paper or felt cloth but handy none-the-less. 

Lucia Prima submitted a handy History routine to Tip & Tricks. Later, someone asked for a bookmark so I used Lucia's example altering it slightly to come up with this. 

This Bookmark will allow the user to add the currently viewed page to the bookmark menu, as well as clear the menu altogether.

Just Copy and Paste the code below into a button on your Master Page. Read the remark statements to learn what the script is doing.


. /// Read-in any previous bookmarks //////
FileRead "[PubDir]bookmark.txt" "ALL" "[booklist]"

. /// Build a menu list including Add & Clear Bookmarks
MenuEx "6" "18" "Add to Bookmarks|Clear Bookmarks|[booklist]" "[selected]"

. /// Error trap a 'click-away', or no selection.
If "[selected]" "<>" "0"
 

. /// ADD BOOKMARK
If "[selected]" "=" "1"
  FileWrite "[PubDir]bookmark.txt" "Append" "[PageTitle]"
EndIf

. /// CLEAR BOOKMARKS
If "[selected]" "=" "2"
  FileErase "[PubDir]bookmark.txt"
EndIf

. /// Get Bookmark / PageTitle then go to the selected page
... If the selection is higher than "2" then we know the 
... user has chosen a bookmarked page from the menu.
If "[selected]" ">" "2"
  FileRead "[PubDir]bookmark.txt" "[selected]-2" "[PgTitle]" 
  .. "-2" because of the top two menu selections, (Add & Clear Bookmarks)
  GotoPage "[PgTitle]"
EndIf
 

EndIf ... (from error-trap)
 


** Cool Trick **

Sometimes Copying script from a tabled web page like this one, then Pasting into NeoBook can get ugly! The link below is the actual bookmark menu button. It is a real NeoBook object. Click the link and a new window will appear containing the NeoBook script. Select all the text (Ctrl+A) in the script window then Copy it to the Clipboard (Ctrl+C). 

Next, open your book project NeoBook and go to the Master Page. Press the Paste button on the NeoBook toolbar. Sha-Zam! The bookmark button will appear in your PUB, ready-to-use.
...

 


Bookmark Menu Button Object