Community
    • Login

    PythonScript

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    30 Posts 5 Posters 2.8k 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.
    • Heinz Berecz 0H
      Heinz Berecz 0 @Ekopalypse
      last edited by

      @ekopalypse Via the plugin menu new script. The save dialog pointed to D:\N++\plugins\PythonScript\scripts\

      EkopalypseE 1 Reply Last reply Reply Quote 0
      • EkopalypseE
        Ekopalypse @Heinz Berecz 0
        last edited by Ekopalypse

        @heinz-berecz-0

        hmmm … strange, it should point to D:\N++\plugins\config\PythonScript\scripts instead.
        Could be related to Explorer caching, but not quite sure.

        Heinz Berecz 0H Alan KilbornA 3 Replies Last reply Reply Quote 0
        • Heinz Berecz 0H
          Heinz Berecz 0 @Ekopalypse
          last edited by

          @ekopalypse Thank you. I copied my script to D:\N++\plugins\config\PythonScript\scripts, now it works.

          1 Reply Last reply Reply Quote 0
          • Alan KilbornA
            Alan Kilborn @Ekopalypse
            last edited by

            @ekopalypse said in PythonScript:

            hmmm … strange, it should point to D:\N++\plugins\config\PythonScript\scripts instead.
            Could be related to Explorer caching, but not quite sure.

            I often prove out scripts I’m about to post by using a “clean” portable N++/PS setup. It makes me crazy that this new setup somehow knows my daily-use directory structure and defaults to this when I am trying to create/save a script. I often make the mistake of saving in my daily-use hierarchy, something I definitely don’t want to be doing.

            1 Reply Last reply Reply Quote 0
            • Heinz Berecz 0H
              Heinz Berecz 0 @Ekopalypse
              last edited by

              @ekopalypse You have PythonScript Version 3.0.7, my Version is after newly installing the PythonScript plugin 1.5.4

              Alan KilbornA PeterJonesP 2 Replies Last reply Reply Quote 0
              • Alan KilbornA
                Alan Kilborn @Heinz Berecz 0
                last edited by

                @heinz-berecz-0 said in PythonScript:

                You have PythonScript Version 3.0.7, my Version is after newly installing the PythonScript plugin 1.5.4

                3.x is a pre-release version, if you want it you have to do special things to install it (go to the PS website and manually get it and manually install it).

                Installing via Plugins Admin will get you 1.5.4.

                1 Reply Last reply Reply Quote 1
                • PeterJonesP
                  PeterJones @Heinz Berecz 0
                  last edited by

                  @heinz-berecz-0 said in PythonScript:

                  @ekopalypse You have PythonScript Version 3.0.7, my Version is after newly installing the PythonScript plugin 1.5.4

                  Eko’s example may be that way. But the animation I showed was using PythonScript version 1.5.4, and it worked the way I intended.

                  I think why you (and Alan) have problems with Windows remembering the “wrong” scripts directory is because (if I understand correctly), some of Windows’ “memory” in the registry for last-opened-folder in the FileOpen or similar windows is based on the name of the application (so in this case notepad++.exe), rather than on the full path to the application (c:\program files\notepad++\notepad++.exe vs x:\some\portable\path\notepad++.exe for a portable), so Windows may only keep one recently-opened-folder setting for both notepad++.exe. (But that’s a piecemeal memory, nothing with hard data to support that conclusion.) Any time you bring Windows OS into the mix, a new level of confusion arises. ;-)

                  Alan KilbornA 1 Reply Last reply Reply Quote 1
                  • Alan KilbornA
                    Alan Kilborn @PeterJones
                    last edited by

                    @peterjones said in PythonScript:

                    I think why you (and Alan) have problems with Windows remembering the “wrong” scripts directory is because…

                    OK… but I’d think that the PythonScript plugin itself should always open its ...\plugins\Config\PythonScript\scripts\ folder as a default, at least from the very first opening.

                    Don’t turn this over to Windows, if that’s truly what is happening.

                    Again, IMO.

                    1 Reply Last reply Reply Quote 2
                    • Heinz Berecz 0H
                      Heinz Berecz 0 @Ekopalypse
                      last edited by

                      @ekopalypse said in PythonScript:

                      hmmm … strange, it should point to D:\N++\plugins\config\PythonScript\scripts instead.
                      Could be related to Explorer caching, but not quite sure.

                      The PythonScript plugin always open its …\plugins\Config\PythonScript\scripts\ folder as a default,
                      if Settings>Preferences>Default Directory>Default Open/Save Directory> is set to …\plugins\Config\PythonScript\scripts\

                      Alan KilbornA 2 Replies Last reply Reply Quote 0
                      • Alan KilbornA
                        Alan Kilborn @Heinz Berecz 0
                        last edited by

                        @heinz-berecz-0 said in PythonScript:

                        The PythonScript plugin always open its …\plugins\Config\PythonScript\scripts\ folder as a default,
                        if Settings>Preferences>Default Directory>Default Open/Save Directory> is set to …\plugins\Config\PythonScript\scripts\

                        True enough, but only people that write exclusively PythonScripts would want that setting set that way. Not useful to do this, generally.

                        1 Reply Last reply Reply Quote 2
                        • Alan KilbornA
                          Alan Kilborn @Heinz Berecz 0
                          last edited by

                          @heinz-berecz-0 said in PythonScript:

                          The PythonScript plugin always open its …\plugins\Config\PythonScript\scripts\ folder as a default,
                          if Settings>Preferences>Default Directory>Default Open/Save Directory> is set to …\plugins\Config\PythonScript\scripts\

                          But maybe doing that eases my pain in my script-testing copy of N++ (and maybe that was your point; if so I missed it at first).

                          Heinz Berecz 0H 1 Reply Last reply Reply Quote 1
                          • Heinz Berecz 0H
                            Heinz Berecz 0 @Alan Kilborn
                            last edited by

                            @alan-kilborn Another problem: N++ replaces Tab characters into blanks (only with .py files). How can I prevent N++ from doing that?

                            Alan KilbornA 1 Reply Last reply Reply Quote 0
                            • Alan KilbornA
                              Alan Kilborn @Heinz Berecz 0
                              last edited by Alan Kilborn

                              @heinz-berecz-0 said in PythonScript:

                              Another problem: N++ replaces Tab characters into blanks (only with .py files). How can I prevent N++ from doing that?

                              Well, ideally…you don’t.
                              The recommended standard for Python is to insert 4 spaces every time the Tab key is pressed.
                              If you must deviate from that standard, UGH, you go into the Settings > Preferences… > Language > Tab Settings > python and change it to what you want:

                              e2cba047-15b5-4a3c-ab06-150e2578a104-image.png

                              Heinz Berecz 0H 1 Reply Last reply Reply Quote 2
                              • Heinz Berecz 0H
                                Heinz Berecz 0 @Alan Kilborn
                                last edited by

                                @alan-kilborn said in PythonScript:

                                The recommended standard for Python is to insert 4 spaces every time the Tab key is pressed.
                                If you must deviate from that standard, UGH, you go into the Settings > Preferences… > Language > Tab Settings > python and change it to what you want:

                                Thank you very much.

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