Install the scripting plugin to run scripts in JOSM.
Use it to automate small tasks for which no dedicated plugin is available, i.e.
- additional quality tests for which no validator test cases are available
- automatically entering data in very specific situations (i.e. automatically entering a sequences of house numbers)
- importing from a custom file format not supported by JOSM
- exporting to a custom file format not supported by JOSM