Coder Social home page Coder Social logo

Comments (12)

d0vgan avatar d0vgan commented on June 1, 2024 1

This change is already in https://github.com/d0vgan/nppexec/tree/develop , please feel free to check.

from nppexec.

d0vgan avatar d0vgan commented on June 1, 2024 1

The added feature is this one:
the message "==== READY ====" is optional now (npe_console p-)

from nppexec.

d0vgan avatar d0vgan commented on June 1, 2024

Currently it's not possible (i.e. the message "=== READY ===" can not be turned off).
At the level of the source code, there are 2 places responsible for this message to appear at the end of NppExec's script. Search for "================ READY ================" in the source file "NppExecCommandExecutor.cpp". Some condition can be introduced to turn it on/off. For example, it could be something similar to

if ( pNppExec->GetOptions().GetBool(OPTB_CONSOLE_MSGREADY) )
{
    pNppExec->GetConsole().PrintMessage( _T("================ READY ================"), false );
}

where OPTB_CONSOLE_MSGREADY needs to be added to the enum EPluginOptions (in NppExec.h) and the corresponding array item to be added to the CStaticOptionsManager::OPT_ITEM optArray (in NppExec.cpp).

from nppexec.

pidgeon777 avatar pidgeon777 commented on June 1, 2024

Thanks for the prompt reply. In my opinion, it would be interesting to add an option to disable the printing in the console of that string.
If someone would want to insert a marker indicating the end of an operation, he could manually add a final print to the script (e.g. echo).
What do you think about it?

from nppexec.

pidgeon777 avatar pidgeon777 commented on June 1, 2024

Or, another possibility, could be to pass the option as an argument of npe_console.

E.g.:

npe_console -r =>disable ready status message
npe_console +r =>enable ready status message

from nppexec.

pidgeon777 avatar pidgeon777 commented on June 1, 2024

Wow, impressive. You've been really fast!

Unfortunately, Visual Studio is not installed in my system, so I have not a chance to build and test it...

from nppexec.

pidgeon777 avatar pidgeon777 commented on June 1, 2024

Ok, I've been able to build it. I'll test it right now.

from nppexec.

pidgeon777 avatar pidgeon777 commented on June 1, 2024

I did some tests. The console had some text:

AAA
BBB -> This line was highlighted in the console due to the cursor placed here
CCC

and after having executed this script:

npp_console disable
npe_console a+ --
npe_console p- --

npp_menucommand Plugins||NppExecSearch||Toggle ConsoleSearch
npp_menucommand Plugins||NppExecSearch||Go to next error

then the console cursor went to the last row of the console.

Is there a way to prevent this behaviour, so that the cursor position in the console is not touched after executing a script?

from nppexec.

d0vgan avatar d0vgan commented on June 1, 2024

To achieve that, I'd have to make a lot of changes - such as verifying whether something was printed to the Console or not inside each internal command. Well, maybe it could be solved in some less complicated way, but anyway there's no ready-to-use mechanism for this, and a noticeable effort would be needed to create one.

from nppexec.

pidgeon777 avatar pidgeon777 commented on June 1, 2024

Ok thanks for the detailed analysis. Maybe something like this could be more achievable?:

#17

This is what I was trying to implement in my 'Console error browsing' script.

from nppexec.

d0vgan avatar d0vgan commented on June 1, 2024

The latest NppExec.dll built from the development branch (i.e. a work-in-progress version, not a final release!) is available here:
https://sourceforge.net/projects/npp-plugins/files/NppExec/NppExec%20Plugin%20v0.6%20RC3-RC4%20%28dev%29/

from nppexec.

pidgeon777 avatar pidgeon777 commented on June 1, 2024

Hello, what feature was added in the release you mentioned above? I'm not sure if it is related to the one I described in this topic or not.

from nppexec.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.