Community
    • Login

    nppexec Issue with npp_switch()

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    6 Posts 2 Posters 3.5k 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.
    • T0mateT
      T0mate
      last edited by

      Hi,

      I try to do this:
      set current = $(FULL_CURRENT_PATH)
      npp_switch($(#1))
      npp_switch($(current))
      unset current

      And got this in the console where <pathtofile> is a real path (the file is here):
      SET: current = new 4
      $(CURRENT) = new 4
      npp_switch(<pathtofile>\pdfdocument.class.php)
      CreateProcess() failed with error code 2:
      Le fichier spécifié est introuvable.

      npp_switch(new 4)
      CreateProcess() failed with error code 2:
      Le fichier spécifié est introuvable.

      -the user’s variable has been removed: $(CURRENT)
      ================ READY ================

      Any idea why?
      Thanks.

      Claudia FrankC 1 Reply Last reply Reply Quote 0
      • Claudia FrankC
        Claudia Frank @T0mate
        last edited by

        Hello @T0mate,

        to many round brackets ;-)

        This should do the trick

        set current = $(FULL_CURRENT_PATH)
        npp_switch $(#1)
        npp_switch $(current)
        unset current
        

        Cheers
        Claudia

        1 Reply Last reply Reply Quote 0
        • T0mateT
          T0mate
          last edited by

          Thanks it works.
          I have an other question can I do something like that:
          set N = 1
          $(#$(N))

          ?

          1 Reply Last reply Reply Quote 0
          • T0mateT
            T0mate
            last edited by

            I have a last question can I configure nppexec to execute a script when I open a new file?
            I know I can when n++ start but it’s not executed when it’s already started and I choose to open a new file.

            1 Reply Last reply Reply Quote 0
            • Claudia FrankC
              Claudia Frank
              last edited by

              Unfortunattely both answers are: afaik no.
              Neither docs nor internal help indicate something different.

              Cheers
              Claudia

              1 Reply Last reply Reply Quote 0
              • T0mateT
                T0mate
                last edited by

                Thanks for your help.

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post
                The Community of users of the Notepad++ text editor.
                Powered by NodeBB | Contributors