notepad++ NppExec - complete list of all internal commands? - command-line

For notepad++ plugin NppExec, there are many internal commands like NPP_SAVE, SEL_SAVETO.
There are many examples using various internal commands in help file.
But the complete list of internal commands does not exist in help file.
Where is the complete list of internal commands of NppExec?

Related

PowerShell, make 7-Zip automatically associate file types and add the 7-Zip context menu

I use 7-Zip in a portable way on various different systems and inside Windows Sandbox so the associations are missing every time I start on those systems. I can go to 7-Zip > Tools > Options > Press the "+" button to associate, and then go to the Options > 7-Zip tab and check "Integrate 7-Zip in shell context menu". However, it would be very convenient if there was a way to automate this.
Ideally, I would like to do this in PowerShell as part of a script that I use to adjust UI options when I am working on various servers, such that:
if (Test-Path "$SevenZipPath\7zFM.exe") {
# Add the 7-Zip menu into the File Explorer right-click context menu
# Apply associations for all 7-Zip supported file types
}
Is there a way to a) add the 7-Zip shell context menu, and b) apply all associations to 7-Zip?
I find clues to a) here (but for Visual Studio Code). It would be good to have an equivalent for 7-Zip.
File associations for b) might be harder as on searching for how to do that in general, most answers are broken and various sites suggest that ftype / assoc stopped working due to a Windows Update around 2020 and never started worked again. It would be good to have a reliable/generic method that allows associating file types in Windows (how 7-Zip internally creates these associations is a mystery).
You can manually create file associations in the registry with Set-ItemProperty inside HKCU (if you use HKLM you will need to restart explorer.exe or the system to take effect)
Installing a context menu manually is much the same as adding file extensions. The registry modifications will be more application specific - but you can use Process Explorer to examine how 7zfm does it. To do this run Process Explorer(as admin), set a filter to only show registry access from 7zfm.exe, then launch 7zfm.exe(also as admin) configure as required and close 7zfm - observe results in Process Explorer - and create the keys as required.
Also possible dirty hack - 7zfm will only install file associations when run as administrator - you might be able to fake that with Start-Process, Start-Sleep and Stop-Process?

Run dependencies in current folder instead of vscode directory

I am looking to build a VSCode Extension around a CLI tool which we have been working on. An example command would be
myCLI retrieve SourceName
This would be run from a specific directory (for example c:/workspace/myproject) which has been setup and contains a settings.json file for some config arguments.
This CLI has been designed that the methods which are called (for example 'retrieve') are exposed directly so the CLI itself is a wrapper also.
When trying to call these methods directly from a VS Code Extension, it is always checking in the C:/Program Files/Microsoft VS Code directory, which I understand is where the Extension is excuting from.
Now, the question: Is there any way for me to force that any time we call the method (for example 'retrieve') that this would look into the current workspace folder (C:/workspace/myProject) , and not the VS Code one (C:/Program Files/Microsoft VS Code)?
Notes which may change answers
CommonJS (not yet ESM)
We currently cannot pass in a full qualified path (for example C:/workspace/myProject), it is only looking for ./settings.json since it depends on where the CLI has bene run from
I want to avoid calling the CLI directly, as I would like to bring many of the CLI features into the VS Code Extension directly to improve user friendliness.

'no module found' error in Python 3.9 for windows 10

I'm a total beginner in Python, I'm reading 'Learning Python' by Mark Lutz and following along in the book. I created a file called 'script1.py', saved as an 'all files' (as opposed to a .txt file) in notepad. The name of the file, code, etc. is verbatim to that which the book instructs.
I know script1.py is there and works, I know this because when I enter 'py script1.py' in my command prompt or git bash, it correctly outputs the product of the code.
The book instructs me to run 'import script1' in Python. When I do, I get the 'module not found' error. I've tried importing as stated above, a from-import command, moving 'script1' to and from different directories. I confirmed my PATH was set up to support python, nothing.
It seems (to my UNtrained eye anyway) that python isn't finding my files. Any and all help would be greatly appreciated. Thank you.
Remember that you can only import python files into a python program. In your File Explorer, make sure that file extensions are shown and verify that your script is script1.py and not script1.py.txt or something of that sort.

Pass a text file into a Java program as a parameter in Eclipse

I'm trying to pass a .txt file as a paramater into my java program.
My program is titled SetTest and the file I'm trying to read is Ted.txt. From a Windows 7 command prompt I create a temp folder and compile my program there creating SetTest.class. Also in that folder is Ted.txt. From that temp directory I then issue the command:
java SetTest < Ted.txt
Everything works as expected. The program reads in the file and outputs what I'm looking for. All good.
My question is how do I duplicate this using Eclipse? I believe my text file is in the proper location, listed under JRE System Library as seen in the Package Explorer. I've been trying the following from Eclipse: Run -> Run Configurations... Then in the (x)= Arguments section, in the Program arguments field I enter Ted.txt then click on Run. Unfortunately nothing seems to happen. No error message, but I don't see the console output I'm looking for either.
To rephrase your question - you want to send a file to your application's standard input, while it is running in Eclipse.
You can write (copy & paste) data into console (that's where the standard input is taken from). However I am not aware of any possibility how you can redirect file contents directly to the standard input.
UPDATE with correct keywords you might be able to find more resources:
Eclipse reading stdin (System.in) from a file
https://bugs.eclipse.org/bugs/show_bug.cgi?id=155411

searching in Perforce Visual Client

I am new in perforce Visual Client and I am not able to figure out a very basic utility. I want to search my workspace for files which contain some specific words. I found out that at Edit --> Find in File ---> there are two options Search in: and All or part of the file name:. But where do I set the filter that I only want to search files which contain specific words? I think the Perforce Visual Client should have this basic utility somewhere but maybe I'm missing it. Kindly help me to find this option. Your help greatly appreciated.
Perforce visual client do not contain tool for searching files with specific content. You can use command line:
p4 grep -e compile_settings //Jam/MAIN/src/...
check http://www.perforce.com/blog/100712/p4-grep