• Login
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.
  • C
    cmeriaux @PeterJones
    last edited by Jan 3, 2022, 3:19 PM

    @peterjones said in PythonScript:

    Why do you say that?

    I think (but I may be wrong) notepad++ doesn’t install any plugins in AppData\Roaming\Notepad++\plugins anymore. So those folder must be created manually.

    P 1 Reply Last reply Jan 3, 2022, 3:37 PM Reply Quote 0
    • P
      PeterJones @cmeriaux
      last edited by Jan 3, 2022, 3:37 PM

      @cmeriaux said in PythonScript:

      I think (but I may be wrong) notepad++ doesn’t install any plugins in AppData\Roaming\Notepad++\plugins anymore. So those folder must be created manually.

      It doesn’t install any plugins in that folder. But %AppData%\Notepad++\plugins\Config\ is still where plugins configuration files go… And for PythonScript, %AppData%\Notepad++\plugins\Config\PythonScript\scripts\ is still the location for user scripts, and even if %AppData%\Notepad++\plugins\Config\PythonScript\ doesn’t exist yet.

      On my machine where I normally don’t use the AppData (so I don’t have a Notepad++ in the %AppData% hierarchy), I just unzipped a fresh portable, then removed doLocalConf.xml, so that the portable will use %AppData%. I installed PythonScript, and ran Plugins > Python Script > New Script: it defaulted to %AppData%\Notepad++\plugins\Config\PythonScript\scripts\ … and it did create that folder for me when I saved the new script. (And portable without doLocalConf.xml is the same as a normal installation, as far as using the AppData folder is concerned.)

      1 Reply Last reply Reply Quote 2
      • H
        Heinz Berecz 0 @cmeriaux
        last edited by Jan 3, 2022, 5:25 PM

        @cmeriaux said in PythonScript:

        you have to select a script (in user scripts or machine scripts), then the add button become available

        I cannot select a script (in user scripts or machine scripts), because both fields are empty

        1 Reply Last reply Reply Quote 0
        • H
          Heinz Berecz 0 @Ekopalypse
          last edited by Jan 3, 2022, 5:40 PM

          @ekopalypse said in PythonScript:

          To assign a shortcut, the script must be available in this yellow highlighted area.

          On my PC no scripts are available in this yellow highlighted area nor in the user scripts or machine scripts area.

          P 1 Reply Last reply Jan 3, 2022, 5:46 PM Reply Quote 0
          • P
            PeterJones @Heinz Berecz 0
            last edited by Jan 3, 2022, 5:46 PM

            @heinz-berecz-0 said in PythonScript:

            On my PC no scripts are available in this yellow highlighted area nor in the user scripts or machine scripts area.

            The user-scripts area will be empty if you haven’t created any user scripts, so that’s natural. But the machine scripts will only be empty if you had a bad installation of PythonScript, or if you intentionally deleted all the example scripts. But if you can see the sample scripts in the Plugins > Python Script > Scripts > Samples submenu, then they weren’t deleted.

            Since sometimes animation helps users see something that simple screenshots do not:

            H 1 Reply Last reply Jan 4, 2022, 10:31 AM Reply Quote 3
            • H
              Heinz Berecz 0 @PeterJones
              last edited by Jan 4, 2022, 10:31 AM

              @peterjones said in PythonScript:

              The user-scripts area will be empty if you haven’t created any user scripts, so that’s natural. But the machine scripts will only be empty if you had a bad installation of PythonScript, or if you intentionally deleted all the example scripts. But if you can see the sample scripts in the Plugins > Python Script > Scripts > Samples submenu, then they weren’t deleted.

              How can I uninstall a bad installation of PythonScript?

              E 1 Reply Last reply Jan 4, 2022, 10:35 AM Reply Quote 0
              • E
                Ekopalypse @Heinz Berecz 0
                last edited by Jan 4, 2022, 10:35 AM

                @heinz-berecz-0

                How did you install it in the first place?
                If you used the msi package, remove it via the Windows function for removing programmes. Otherwise, do it via the plugin admin of Npp.

                a9824664-58eb-4043-a3ad-4015180b1932-image.png

                H 2 Replies Last reply Jan 4, 2022, 11:17 AM Reply Quote 0
                • H
                  Heinz Berecz 0 @Ekopalypse
                  last edited by Jan 4, 2022, 11:17 AM

                  @ekopalypse Thank you, now it works. But a new Script (\plugins\PythonScript\scripts\aa.py ) appears in the machine scripts area, not in the user scripts area.

                  E 1 Reply Last reply Jan 4, 2022, 11:20 AM Reply Quote 0
                  • E
                    Ekopalypse @Heinz Berecz 0
                    last edited by Jan 4, 2022, 11:20 AM

                    @heinz-berecz-0

                    How did you create this new script?
                    Via the plugin menu new script?
                    If so, an save dialog should have opened asking you to save the file. Where did it point to?

                    H 1 Reply Last reply Jan 4, 2022, 11:56 AM Reply Quote 0
                    • H
                      Heinz Berecz 0 @Ekopalypse
                      last edited by Jan 4, 2022, 11:56 AM

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

                      E 1 Reply Last reply Jan 4, 2022, 12:13 PM Reply Quote 0
                      • E
                        Ekopalypse @Heinz Berecz 0
                        last edited by Ekopalypse Jan 4, 2022, 12:15 PM Jan 4, 2022, 12:13 PM

                        @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.

                        H A 3 Replies Last reply Jan 4, 2022, 1:35 PM Reply Quote 0
                        • H
                          Heinz Berecz 0 @Ekopalypse
                          last edited by Jan 4, 2022, 1:35 PM

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

                          1 Reply Last reply Reply Quote 0
                          • A
                            Alan Kilborn @Ekopalypse
                            last edited by Jan 4, 2022, 2:00 PM

                            @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
                            • H
                              Heinz Berecz 0 @Ekopalypse
                              last edited by Jan 4, 2022, 2:05 PM

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

                              A P 2 Replies Last reply Jan 4, 2022, 2:07 PM Reply Quote 0
                              • A
                                Alan Kilborn @Heinz Berecz 0
                                last edited by Jan 4, 2022, 2:07 PM

                                @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
                                • P
                                  PeterJones @Heinz Berecz 0
                                  last edited by Jan 4, 2022, 2:29 PM

                                  @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. ;-)

                                  A 1 Reply Last reply Jan 4, 2022, 2:38 PM Reply Quote 1
                                  • A
                                    Alan Kilborn @PeterJones
                                    last edited by Jan 4, 2022, 2:38 PM

                                    @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
                                    • H
                                      Heinz Berecz 0 @Ekopalypse
                                      last edited by Jan 4, 2022, 4:21 PM

                                      @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\

                                      A 2 Replies Last reply Jan 4, 2022, 5:50 PM Reply Quote 0
                                      • A
                                        Alan Kilborn @Heinz Berecz 0
                                        last edited by Jan 4, 2022, 5:50 PM

                                        @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
                                        • A
                                          Alan Kilborn @Heinz Berecz 0
                                          last edited by Jan 4, 2022, 6:23 PM

                                          @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).

                                          H 1 Reply Last reply Jan 5, 2022, 3:40 PM Reply Quote 1
                                          17 out of 30
                                          • First post
                                            17/30
                                            Last post
                                          The Community of users of the Notepad++ text editor.
                                          Powered by NodeBB | Contributors