• Login
Community
  • Login

Macro language

Scheduled Pinned Locked Moved General Discussion
15 Posts 5 Posters 1.4k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E
    Ekopalypse @Dario de Judicibus 0
    last edited by Oct 3, 2020, 7:53 PM

    @Dario-de-Judicibus-0 said in Macro language:

    A JavaScript-like language would be great (E

    Checkout jN Notepad++ plugin. Can be installed from plugin admin.

    D 2 Replies Last reply Oct 7, 2020, 8:15 AM Reply Quote 5
    • D
      Dario de Judicibus 0 @Alan Kilborn
      last edited by Oct 7, 2020, 8:13 AM

      @Alan-Kilborn I did not know of Phytonscript. It is not part of the basic package, isn’t it? Any other script language can be used with Notepad++? Where can I fond docs?

      1 Reply Last reply Reply Quote 0
      • D
        Dario de Judicibus 0 @Ekopalypse
        last edited by Oct 7, 2020, 8:15 AM

        @Ekopalypse Great! Thank you.

        1 Reply Last reply Reply Quote 0
        • D
          Dario de Judicibus 0 @Ekopalypse
          last edited by Oct 7, 2020, 8:34 AM

          @Ekopalypse I installed JN and I got a lot of new menu which looks like quite cryptic. I cannot find a clear documentation of available API or a User Manual. Can you give me a link to any document could help me to develop JS for Notepad++? Of course, I already know JS but I need a reference of NPP API’s. Thank you in adavnce.

          1 Reply Last reply Reply Quote 0
          • A
            ArkadiuszMichalski
            last edited by Oct 7, 2020, 9:13 AM

            https://github.com/sieukrem/jn-npp-plugin/wiki << just press (Pages 10) button in right site. And for API you see description:

            API documentation you find in plugins/jn/API/api.xml

            But I’m not sure if this api.xml still exist in actual JN version. I have old copy but can’t upload here.

            jN is “specific” because add entries in Menu bar (not in Plugin menu), they cannot be accessed from other plugins, etc. By default, it adds a lot of scripts, if you do not need them, create another folder in the NPP\plugins\jN\jN\includes directory (e.g. _off) and put unnecessary scripts in it (or remove them).

            1 Reply Last reply Reply Quote 2
            • D
              Dario de Judicibus 0
              last edited by Oct 7, 2020, 9:24 AM

              I got api.xml but I found really few info, just related to menus. What I am looking for are NPP API’s. For example, I want to duplicate current file, so I want to know which are the methods equivalent to

              Ctrl-A
              Ctrl-C
              Get current name to define a new one -> newName = myOwnFuncToGenerate(currName)
              Get current folder in case “follow current document” is NOT set --> currFolder
              Get current language to use the same ->currLang
              Ctrl-N
              Ctrl-V
              Set language to currLang
              Save as newName in currFolder

              What I cannot find is a REFERENCE to Editor methods and similar.

              1 Reply Last reply Reply Quote 0
              • E
                Ekopalypse
                last edited by Oct 10, 2020, 10:55 AM

                @Dario-de-Judicibus-0

                I have no experience with this plugin, I only mentioned it because you were looking for a js alternative.
                A quick search at github revelead this and the documentation about these functions can be found here .

                1 Reply Last reply Reply Quote 1
                • A
                  ArkadiuszMichalski
                  last edited by Oct 10, 2020, 11:03 AM

                  In api.xml you have some commands for IEditor, you can also check existing scripts have they use this obj.
                  runMenuCmd(cmd) - runs a specified build-in menu command of Notepad++.

                  D 1 Reply Last reply Oct 15, 2020, 11:56 AM Reply Quote 2
                  • D
                    Dario de Judicibus 0 @ArkadiuszMichalski
                    last edited by Oct 15, 2020, 11:56 AM

                    @ArkadiuszMichalski It looks like there is no way to get current file language and set new file to same langua. So gain, what is really missing in Notepad++ is a specific macro language. This plugin is quite cumbersome to use and badly documented.

                    A T 2 Replies Last reply Oct 15, 2020, 12:01 PM Reply Quote 0
                    • A
                      Alan Kilborn @Dario de Judicibus 0
                      last edited by Oct 15, 2020, 12:01 PM

                      @Dario-de-Judicibus-0 said in Macro language:

                      This plugin is quite cumbersome to use and badly documented.

                      Not all plugins are created equal.
                      You do know that plugins are not created/maintained by the same team that does Notepad++, right?

                      So (a)gain, what is really missing in Notepad++ is a specific macro language.

                      I think if you try a scripting plugin that is well-done (Pythonscript, LuaScript), you’ll find that your “again” statement is “not strong”.

                      1 Reply Last reply Reply Quote 2
                      • T
                        TroshinDV @Dario de Judicibus 0
                        last edited by TroshinDV Oct 15, 2020, 12:59 PM Oct 15, 2020, 12:56 PM

                        @Dario-de-Judicibus-0 said in Macro language:

                        It looks like there is no way to get current file language and set new file to same langua.

                        Editor.currentView.lang;
                        Screenshot_242.png

                        see, …\Notepad++\plugins\jN\jN\Doc\API\api.xml
                        Screenshot_243.png

                        • есть множество примеров использования плагина и вики на гитхабе.
                        1 Reply Last reply Reply Quote 1
                        14 out of 15
                        • First post
                          14/15
                          Last post
                        The Community of users of the Notepad++ text editor.
                        Powered by NodeBB | Contributors