About a Run-like submenu

  • Asking-about-NotePad+±RunMe.txt

    Hi, friends.

    Greetings, friends.

    I would to know if I could change the Run sub-menu in the NotePad++ main menu (or something alike).

    I would like a sub-menu like this:

    Run with Lua v5.1
    Run with Lua v5.2
    Run with Lua v5.3
    Run with wxLua

    Compile with LuaC v5.1
    Compile with LuaC v5.3

    Run with VFP9
    Run with VFPA

    Modify shortcut…

    And that the last option, called “Modify shortcut…” could be used for choosing up one of the above options and setting it up (it means changing its parameters), something like:

    Executable to run: D:\Utilities\VFP9\VFP9.exe
    Parameters before:
    Parameters after : -t
    Hot key: Alt+F8
    Minimize NotePad, set focus to process window: o Yes, o No
    Add separator before:
    Add separator after :

    Could a scenario like this be accomplished in NotePad++?

    I am reviewing the RunMe plugin, but I have not seen I could get what have mentioned above.


  • @Jesús-Hernán-Cano-Martínez

    sounds like nppexec plugin might do what you want,
    but have to admit, that your wishes about parameters … aren’t very clear to me.

  • Thanks, Ekopalypse.

    When we need to compile a program using CLI (VS), we need something like

    C:\directory\g++.exe -Wall helloWorld.cpp

    where -Wall is a parameter/argument.

    When we need to run a program in Lua, we need something like

    C:\directory\lua.exe -lC:\directory\library.lua %CD%MAIN.LUA

    where -lC:\directory\library.lua is a parameter/argument.

    That is what I mean: some letters/words that we need to inject to the command line that is executed for a proper execution in our scenario.

    I’ll try NPPExec plugin.

    Thanks, friend.

  • @Jesús-Hernán-Cano-Martínez

    Have a look at my NppExec script which I use to start various script interpreters/compilers depending on current file’s filename extension.

  • @Jesús-Hernán-Cano-Martínez

    I guess I understand now.
    As long as those run shortcuts are one liners you can do it without using any plugins.
    Just use the standard run menu, put in what you need and save it with a meaningful name - done.
    But if you need to do some preparation like setting environment variables or
    different parameters like different include files depending on the project you want to
    compile with g++ then NppExec is the better choice.
    You can, like @dinkumoil did, make one big script or define a script for each of your different tools you want to use.

  • Yes, @Ekopalypse. With NppExec I got it. Thanks.

Log in to reply