Clear All Bookmarks

Help with writing and running scripts

Clear All Bookmarks

Postby puckman » Thu Dec 16, 2010 12:49 am

Can I issue a Clear All Bookmarks command from a script? I've done a quick search and there doesn't seem to be such a command available to script?
puckman
Newbie
 
Posts: 3
Joined: Fri Dec 03, 2010 1:00 pm

Re: Clear All Bookmarks

Postby Mofi » Thu Dec 16, 2010 1:23 am

The command Clear All Bookmarks is not available as script or macro command. However, the macro code I posted at Clear All Bookmarks in Macro can be very easily converted to script function.

Code: Select all
function ClearAllBookmarks () {
   while (true) {
      UltraEdit.activeDocument.bottom();
      UltraEdit.activeDocument.previousBookmark();
      if (UltraEdit.activeDocument.isEof()) break;
      UltraEdit.activeDocument.toggleBookmark();
   }
   UltraEdit.activeDocument.top();
}
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4039
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna


Return to Scripts