General help to built N++ macros in file "shortcuts.xml"
-
Hi, All,
Recently, some people asked for help in order :
-
To build macros directly from within the
shortcuts.xmlfile -
To verify the contents of previous recorded macros, in the
shortcuts.xmlfile -
To get general information regarding the generation of macros in the
shortcuts.xmlfile
So, I decided to gather some documentation in an unique file, named
KEY_SCI_CMD_List.txt, which could help some people !You can download it from https://drive.google.com/file/d/1PLhBKhEzeVJiSa99i_4LyzUGUCFJglHo/view?usp=sharing
To make the most of this file, I recommend that you FIRST rename this file as
KEY_SCI_CMD_List.cpp( C++ file ) !Read the brief explanations to get the full picture and… enjoy !
Best Regards
guy038
-
-
Hi, All,
BTW, at the end of my
KEY_SCI_CMD_List.txtfile, I said the some messages do not work anymore. I would particularly appreciate if we could show/hide the LINE NUMBER margin easily ! Because, presently, this margin is not per file handled but just globally for all files of a N++ session :-((. Generally, I don’t use the line number margin, but, in some cases, the line number margin is quite useful !Before N++
v7.9.2, the IDM_VIEW_LINENUMBER message (44012) worked perfectly, but adding the optionsConstantandDynamicwidth, since thev7.9.2version, breaks down this feature !Of course, I know that this should certainly be done with N++ scripts (
Python,LuaorNppExec). However, does someone have on other idea about this problem ? ( Note that I also tried theCustomize Toobarplugin, but the lastv5.3version does not propose anymore to show/hide margins, whatever they are ! )Hum… I’ve just realized that, speaking about plugins myself, should decide me to use a script plugin for this feature !
BR
guy038
-
Hi, All,
So, I tried to follow the right way with script plugins and did some tests with, either, the
NppExec,Python ScriptandLuaScriptplugins.However, I could not get the
Line Numbermargin to toogle from visible to invisible status and vice-versa !For instance :
-
On NppExec console (
v0.84), the two commands :-
npp_sendmsg WM_COMMAND IDM_VIEW_LINENUMBER -
npp_sendmsg WM_COMMAND 44012
-
do not work
-
On Python console (
v2.0.0.0- Python2.7.18), the two commands :-
notepad.menuCommand(MENUCOMMAND.VIEW_LINENUMBER) -
notepad.menuCommand(44012)
-
do not work, as well
-
On LuaScript console (
v0.12- Lua5.3), the two commands :-
npp:MenuCommand(IDM_VIEW_LINENUMBER) -
npp:MenuCommand(44012)
-
do not work, also
Apparently, adding the options
ConstantandDynamicwidth, regarding the Line Number margin, in N++v7.9.2, breaks down this functionality, since that version :-((I should have realised that before ! If it was impossible to get this fucntionality with a N++ macro, this necessarily meant that NO script plugin could do any better !
To be sure that I correctly used the scripts syntax, I did some tests with two other functions, which worked perfectly :
-
On NppExec console :
-
npp_sendmsg WM_COMMAND IDM_VIEW_REDUCETABBARornpp_sendmsg WM_COMMAND 44005reduce/enlarge the tabs -
npp_sendmsg WM_COMMAND IDM_FILE_NEWornpp_sendmsg WM_COMMAND 41001open a new file
-
-
On Python console :
-
notepad.menuCommand(MENUCOMMAND.VIEW_REDUCETABBAR)ornotepad.menuCommand(44005)reduce/enlarge the tabs -
notepad.menuCommand(MENUCOMMAND.FILE_NEW)ornotepad.menuCommand(41001)open a new file
-
-
On Lua console :
-
npp:MenuCommand(IDM_VIEW_REDUCETABBAR)ornpp:MenuCommand(44005)reduce/enlarge the tabs -
npp:MenuCommand(IDM_FILE_NEW)ornpp:MenuCommand(41001)open a new file
-
So, how to be able to show / hide, easily, the
Line Numbermargin ?May be, I need the @astrosofista’s skills as he could provide us with an
AutoHotKeyscript to achieve this goal ?Best Regards,
guy038
-
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login