How to use SCI_DOCUMENT*START*END via button?
-
Hi again,
just have another small question. I would like to know how I can jump quickly to a DOCUMENTSTART & DOCUMENTEND via custom button? Problem is there is no menu entry in npp I could assign with the Customize Toolbar and I think I can not use those commands SCI_DOCUMENTSTART & SCI_DOCUMENTEND with it or?
Otherwise I could create two macros but in this case I have to open the menu first and choose it = detour. Just would like to have any quicker method to jump right away at a document start & end instead of using the shortcut key combos Crtl+Home & Crtl+End.
By the way, there is also the Go To… menu / button I can press to enter any line / offset. Maybe it would be a good idea to set two another buttons into that little Go To… dialog box called just “Start” & “End” the user can press to jump right away to top & bottom without to enter 0 or any higher value 9999 etc to jump to the end. I think that would make much things more easier (workflow). Otherwise you could also those 2 extra button / function right before the “+” button on the right side of npp what does create a new tab. Next to that is also the arrow down button what does show the Window menu (not sure why you did added that twice). I think right there you could place some top / bottom buttons the users can press to jump quickly etc. Just a idea only. Not everyone does prefer using keyboard shortcuts.
-
@Dean-Corso said in How to use SCI_DOCUMENT*START*END via button?:
with the Customize Toolbar and I think I can not use those commands SCI_DOCUMENTSTART & SCI_DOCUMENTEND with it or?
Otherwise I could create two macros but in this case I have to open the menu first and choose it = detour. Just would like to have any quicker method to jump right away at a document start & end instead of using the shortcut key combos Crtl+Home & Crtl+End.
If you don’t like the shortcuts chosen, you can use Shortcut Mapper to change the shortcuts.
If you absolutely have to have a button, then use a combo of the two options you thought wouldn’t work for you: turn each into a macro, then use the Customize Toolbar’s “Custom Buttons” feature (see Plugins > Customize Toolbar > Help - Custom Buttons) and add entries that point to those macros. For example, if you called the macros GoHome and GoEnd, then you could have the setup:
macros:
<Macro name="GoHome" Ctrl="no" Alt="no" Shift="no" Key="0"> <Action type="0" message="2316" wParam="0" lParam="0" sParam="" /> </Macro> <Macro name="GoEnd" Ctrl="no" Alt="no" Shift="no" Key="0"> <Action type="0" message="2318" wParam="0" lParam="0" sParam="" /> </Macro>
CustomizeToolbar.btn
Macro,GoHome,,,*R:GH,*R:GH Macro,GoEnd,,,*R:GE,*R:GE
et voila, no “detour”, just move your mouse cursor and click. (And if you have an icon creator, the docs on the plugin tell you how to reference an icon instead of a “quick code”) -
Coolio! Thanks for that info. So I didn’t know what I can also use my macros with that Customize Toolbar plugin but it works great. Another new helpfully information. Thanks again!