• Login
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.
  • T
    T0mate
    last edited by Mar 8, 2016, 4:21 PM

    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.

    C 1 Reply Last reply Mar 8, 2016, 7:00 PM Reply Quote 0
    • C
      Claudia Frank @T0mate
      last edited by Mar 8, 2016, 7:00 PM

      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
      • T
        T0mate
        last edited by Mar 10, 2016, 9:49 AM

        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
        • T
          T0mate
          last edited by Mar 10, 2016, 10:29 AM

          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
          • C
            Claudia Frank
            last edited by Mar 10, 2016, 6:12 PM

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

            Cheers
            Claudia

            1 Reply Last reply Reply Quote 0
            • T
              T0mate
              last edited by Mar 11, 2016, 8:39 AM

              Thanks for your help.

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