Opening and interacting with .txt files
I’m working on creating a simple application that checks for a variable in a .txt file, and if it finds the variable have it return the entire string in the file to the user. I understand that this a simple task done using node.js or ES6. However, I’m working on a very limited server that does not have any other resources and its pretty locked down. Are there any other solutions to this that doesn’t require an IDE, extensions, or downloading anything. I can only use Notepad++.
I am open to using other languages that would allow me to do this or even interacting with cmd (as long as I can do it only using Notepad ++!).
I know how to call the function using .html and I’ve been successful doing so with .js files - that’s not a problem.
Are you saying, “I want to use Notepad++ to type the source code for my application”? If so, then do that. I am not sure what the question is in that case.
Are you saying “I want to use my application that I am creating to remote control Notepad++ to automate using Notepad++'s search”? Then do that: Notepad++ accepts standard Windows messages, with a documented API (noting that the documentation assumes that you are writing a plugin that’s running inside Notepad++, but the API works equally well from the outside, as I have shown with my Perl module Win32::Mechanize::NotepadPlusPlus, which allows a Perl script to send messages to Notepad++ to remote control it.
Are you saying “Can I use Notepad++ as a command line ‘filter’ program, where I go
notepad++.exe --someFindOption="searchText" FILENAME.txtand it will output just the matching lines”? If that’s what you are asking, no, from two perspectives: 1) there isn’t yet a run-the-FIND-from-command-line option (perhaps “there isn’t that option yet”: I think it’s been requested, though I don’t remember whether that request is in process or whether it was rejected), and 2) notepad++ doesn’t have a way to dump the contents of a file to the STDOUT. Notepad++ is an interactive Windows GUI program, and is intended to be used as such.