    

 ## On this page

  

 

 # setMacroScript

 Last update: 30.07.2026 

public [setMacroScript](set-macro-script.md)(macroName: [String](https://docs.oracle.com/javase/8/docs/api/java/lang/String.html), script: [String](https://docs.oracle.com/javase/8/docs/api/java/lang/String.html))

set the script for a macro if the macro exists

#### Parameters

macroNamethe name of the macroscriptthe macro script to display in the editor