• Login
Community
  • Login

How can I launch Notepad++.exe from the command line with "plugin" options?

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
2 Posts 2 Posters 1.8k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D
    Drew Wesley
    last edited by Feb 22, 2019, 4:33 AM

    I’m familiar with Command Line Switches guide in the docs, but would like to open a controlled instance of Notepad++ and automatically call NppFTP to connect to a profile with something like:
    “C:\Program Files\Notepad++\Notepad++.exe” -multiInst -nosession -openSession <fullpathofsessionfile> -NppFTP_Connect <profilename>

    M 1 Reply Last reply Feb 22, 2019, 10:01 AM Reply Quote 3
    • M
      Meta Chuh moderator @Drew Wesley
      last edited by Feb 22, 2019, 10:01 AM

      @Drew-Wesley

      this is a nice question and a good idea, but unfortunately not built into notepad++.

      currently it is not possible to start nppftp and connect to a server using command line switches, but it could be done using scripting plugins like pythonscript or luascript as a workaround and playground.

      first you would have to record a macro, as connecting to a specific ftp server can not be triggered by using the menu bar items.

      then, using pythonscript in this example, you can put something like Notepad.runMenuCommand('Macro', 'Connect to your FTP') in your startup.py startup script.

      of course there would be more things to do, like connecting to the corresponding ftp if a file is opened via command line from a specific list of locations, but it’s just an idea, in case you want to dig deeper into scripting.

      1 Reply Last reply Reply Quote 1
      2 out of 2
      • First post
        2/2
        Last post
      The Community of users of the Notepad++ text editor.
      Powered by NodeBB | Contributors