Notepad++ and processing 3

edited November 2015 in Share Your Work

My experiment with notepad++ and processing (windows so)

Run Processing from Command Window

From command prompt type "processing-java --help"
If get an error, you can:
1) add the processing folder to system variable "PATH".
2) specify full path for "processing-java.exe" program

This is the output:
Command line edition for Processing 0247 (Java Mode)

--help Show this help text. Congratulations.
--sketch= Specify the sketch folder (required)
--output= Specify the output folder (optional and cannot be the same as the sketch folder.)
--force The sketch will not build if the output folder already exists, because the contents will be replaced. This option erases the folder first. Use with extreme caution!
--build Preprocess and compile a sketch into .class files.
--run Preprocess, compile, and run a sketch.
--present Preprocess, compile, and run a sketch in presentation mode.
--export Export an application.
--no-java Do not embed Java. Use at your own risk!
--platform Specify the platform (export to application only). Should be one of 'windows', 'macosx', or 'linux'.

The --build, --run, --present, or --export must be the final parameter passed to Processing. Arguments passed following one of those four will be passed through to the sketch itself, and therefore available to the sketch via the 'args' field. To pass options understood by PApplet.main(), write a custom main() method so that the preprocessor does not add one. https://github.com/processing/processing/wiki/Command-Line

Example to run a sketch located at C:\PDE3\max\button\button.pde:

processing-java --sketch="C://PDE3/max/button" --output="C://PDE3/max/button/output" --force --run

The console output is the command window !!

Using Notepad++ with processing 3.0:

  • Install NppExec plugin
  • Menu: Plugin -> NppExec -> Console Output... (set both console to UTF8)
  • Menu: Plugin -> NppExec -> Execute...
    insert text: processing-java --sketch="$(CURRENT_DIRECTORY)" --force --run.
    Press "Save" button and name it "processingExec".
  • Close and restart notepad++
  • Menu: Plugin -> NppExec -> Advanced Options...
  • Press "Associated Script" and select "processingExec"
    Set "Item Name" to "processing".
    Press "Add/Modify" button.
    Activate the checkbox "Place to the Macros submenu".
  • Close and restart notepad++
  • Menu: Settings -> Shortcut Mapper...
    Press "Plugin" button and search the processing item.
    Assign a shortcut.

Now you can run processing from Macro menu or with the shortcut

cameyo

p.s. best solutions are welcome

Sign In or Register to comment.