I just found out about N++ PythonScript and first of all I must say that this is really cool! This is exactly what I was looking for, even if I did not know it until 10 minutes ago ;-) I think that this really makes Notepad++ a "serious" editor, rather than a (really good, really useful) toy editor.
Anyway, I am trying to create my own scripts and the first problem that I've run into is that PythonScript does not find any of my user scripts. To create them I used the PythonScript "New Script" option, but when I open the PythonScript options dialog and select User scripts the script list is empty.
Do I need to place the scripts somewhere in particular?
Cheers,
Amadawn
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That should work fine - what version of PythonScript are you using - try 0.8 if you're not using it already. There was a bug that caused some scripts not to show up in this dialog in earlier versions.
Did you install it with plugin manager, or manually? If manually, user scripts should go in %APPDATA%\Notepad++\plugins\config\PythonScript\scripts, or %ProgramFiles%\Notepad++\plugins\config\PythonScript\scripts, depending on if you have a doLocalConf.xml in your notepad++ directory or not (if it's there, they would be under program files, if not, under appdata).
Also, note that if you've got non ascii characters in your username (and therefore your %APPDATA% path), it won't work properly. That is due to an issue with Python itself, not loading modules from unicode paths on windows - I've got a patched version of Python that will go out with the next version of PythonScript (due out very shortly) that fixes this problem.
Dave.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am using v0.8, and I installed manually. Following your advice, I got it to work by creating "%APPDATA%\Notepad++\plugins\config\PythonScript\scripts" and putting my script files in there.
I think that when you click on "New script" PythonScript should automatically open that folder (and create it if it does not script). Currently, if the folder does not exist, the new script dialog opens your documents folder. This led me to believe that I could place my user scripts anywhere I wanted, which does not seem to be true. If you do not know about this it is impossible to use any of your user scripts.
Alternatively, it would be cool if you could tell PythonScript to use any python script in your hard-drive, and add it to your list of user scripts.
Also, it'd be nice if there was a way to directly edit your scripts (perhaps through am "Edit script" button) from the PythonScript configuration dialog.
Thank you again,
Amadawn
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, it should really create the directory if it doesn't exist. I'll try to get that in the next version.
You can actually tell PythonScript to use any script, there's just no interface for it (the interface won't clobber it though, so it's fine to do it). That was actually the aim, that it should be possible to add any script, with an interface to add the likely ones.
If you edit the PythonScriptStartup.cnf in your plugins\config directory, you'll see the format (it's obvious, but not particularly standard). It's done like this to minimize the startup time, as it has to be read and processed before N++ shows it's window.
This file is re-read before the Config dialog is opened, so it's fine to edit in N++.
I'm not wildly keen on the idea of editing the scripts from the config dialog - you can Ctrl-Click any script from the menu to edit it (with the small exception of scripts you've added to your main menu, that have a Ctrl-something shortcut), which is a more common use-case. There'd be some confusing focus issues that would probably introduce more problems than they'd solve too :)
Thanks for the feedback - always appreciated.
Cheers,
Dave.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I just found out about N++ PythonScript and first of all I must say that this is really cool! This is exactly what I was looking for, even if I did not know it until 10 minutes ago ;-) I think that this really makes Notepad++ a "serious" editor, rather than a (really good, really useful) toy editor.
Anyway, I am trying to create my own scripts and the first problem that I've run into is that PythonScript does not find any of my user scripts. To create them I used the PythonScript "New Script" option, but when I open the PythonScript options dialog and select User scripts the script list is empty.
Do I need to place the scripts somewhere in particular?
Cheers,
Amadawn
That should work fine - what version of PythonScript are you using - try 0.8 if you're not using it already. There was a bug that caused some scripts not to show up in this dialog in earlier versions.
Did you install it with plugin manager, or manually? If manually, user scripts should go in %APPDATA%\Notepad++\plugins\config\PythonScript\scripts, or %ProgramFiles%\Notepad++\plugins\config\PythonScript\scripts, depending on if you have a doLocalConf.xml in your notepad++ directory or not (if it's there, they would be under program files, if not, under appdata).
Also, note that if you've got non ascii characters in your username (and therefore your %APPDATA% path), it won't work properly. That is due to an issue with Python itself, not loading modules from unicode paths on windows - I've got a patched version of Python that will go out with the next version of PythonScript (due out very shortly) that fixes this problem.
Dave.
Thanks you for your help.
I am using v0.8, and I installed manually. Following your advice, I got it to work by creating "%APPDATA%\Notepad++\plugins\config\PythonScript\scripts" and putting my script files in there.
I think that when you click on "New script" PythonScript should automatically open that folder (and create it if it does not script). Currently, if the folder does not exist, the new script dialog opens your documents folder. This led me to believe that I could place my user scripts anywhere I wanted, which does not seem to be true. If you do not know about this it is impossible to use any of your user scripts.
Alternatively, it would be cool if you could tell PythonScript to use any python script in your hard-drive, and add it to your list of user scripts.
Also, it'd be nice if there was a way to directly edit your scripts (perhaps through am "Edit script" button) from the PythonScript configuration dialog.
Thank you again,
Amadawn
Yes, it should really create the directory if it doesn't exist. I'll try to get that in the next version.
You can actually tell PythonScript to use any script, there's just no interface for it (the interface won't clobber it though, so it's fine to do it). That was actually the aim, that it should be possible to add any script, with an interface to add the likely ones.
If you edit the PythonScriptStartup.cnf in your plugins\config directory, you'll see the format (it's obvious, but not particularly standard). It's done like this to minimize the startup time, as it has to be read and processed before N++ shows it's window.
This file is re-read before the Config dialog is opened, so it's fine to edit in N++.
I'm not wildly keen on the idea of editing the scripts from the config dialog - you can Ctrl-Click any script from the menu to edit it (with the small exception of scripts you've added to your main menu, that have a Ctrl-something shortcut), which is a more common use-case. There'd be some confusing focus issues that would probably introduce more problems than they'd solve too :)
Thanks for the feedback - always appreciated.
Cheers,
Dave.