Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #9112

    derekcohen
    Participant

    I have F2 set to go to the next bookmark.

    Is there a way for this to either start at the top of the document or when it gets to the end of the document start again from the top.

    At present it just goes down the document and so doesn’t find bookmarks above the current line

    thanks

    Derek

    #9113

    Yutaka Emura
    Keymaster

    Hello Derek,

    You might want to assign F2 as “Next Bookmark in This Document” command. You can change keyboard assignments from the Keymap on the Help menu.

    Thank you,

    #9115

    CrashNBurn
    Member

    I have F2 set to “Next Bookmark in This Document”, but as the OP indicated, he’d like it to wrap to the beginning when it reaches the end — like the Find option [x] Move to Start/End of Document.

    #9116

    Yutaka Emura
    Keymaster

    Hello CrashNBurn,

    I see. Then you will need to write a macro so that EmEditor will go to the beginning of document when it reaches to the end of document.

    Thank you!

    #9118

    CrashNBurn
    Member

    that, I currently don’t know how to accomplish.

    It looks like it would require the plugin value GET_LINE_INFO
    to know whether the line has changed since before you pressed “F2”. And I don’t see how the javascript and plugin structure relate to one another.

    Nor do I see how one can easily assign a shortcut-key to a macro, so that it will automatically run without user-intervention.

    Now with Autohotkey, I have an idea how it could be done. Monitor object changed when F2 is pressed. If the object hasn’t changed then goto beginning of document (Ctrl+Home) and unhook the RegisterCallBack for object changed.

    #9123

    Yutaka Emura
    Keymaster

    I made a macro for you. NextBookmark() method will return false if EmEditor can’t find the next bookmark in the document.

    bFound = document.selection.NextBookmark();
    if( !bFound ){
    document.selection.StartOfDocument(false);
    document.selection.NextBookmark();
    }

    #9144

    derekcohen
    Participant

    brilliant! thanks

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.