Community
    • Login

    nppexec Issue with npp_switch()

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    6 Posts 2 Posters 3.9k Views 1 Watching
    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 Offline
      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 Offline
        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 Offline
          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 Offline
            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 Offline
              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 Offline
                T0mate
                last edited by

                Thanks for your help.

                1 Reply Last reply Reply Quote 0

                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
                • First post
                  Last post
                The Community of users of the Notepad++ text editor.
                Powered by NodeBB | Contributors