If anyone can suggest a brighter approach to accomplishing this, get back.
This illustrates one way, and I am probably overlooking a smart approach!
6/30/2007 12:32:43 PM
Subject: Writing a Macro to Automatically insert a series of BookMarks.
===========
Situation: I am editing a 200 line program..
I want to automatically insert bookmarks when I load my program, so that If I GoToBookMark6 I will be on Page 6 of my document (of course BookMark2 is Page 2).
When I open my program to edit, At the top I have comment'd in the name of the Bookmark-inserting macro
That I will run on this script, after I open the document.
I then copy the full path name to the system clipboard and pull down Macro/Execute Script/ and paste into the window and hit run.
e.g. my path/file name is:
C:\Program Files\Zeus\zScript\ED'S ZEUS SCRIPTS\LESSONS\SET BOOKMARKS 1 - 6 on First 6 pages.vbs
=====================================
I am using Courier New Size 11 Font. I have a given screen size.
You may have to edit the macro with different line numbers.
Macro Script in Vbs:
Code: Select all
Function key_macro()
call zeus.screen_update_disable
X = 20
call zeus.set_line_pos(X,1)
call zeus.BookMarkDrop1
X = X+39
call zeus.set_line_pos(X,1)
call zeus.BookMarkDrop2
X = X+39
call zeus.set_line_pos(X,1)
call zeus.BookMarkDrop3
X = X+39
call zeus.set_line_pos(X,1)
call zeus.BookMarkDrop4
X = X+39
call zeus.set_line_pos(X,1)
call zeus.BookMarkDrop5
X = X+39
call zeus.set_line_pos(X,1)
call zeus.BookMarkDrop6
call zeus.screen_update_enable
call zeus.screen_update
End Function
key_macro() 'run the macro
Of course I have Key bound BookMarkX (to keys).
It works! -- Ed
