    

 ## On this page

  

 

 # setMacroTimeout

 Last update: 30.07.2026 

public [setMacroTimeout](set-macro-timeout.md)(macroName: [String](https://docs.oracle.com/javase/8/docs/api/java/lang/String.html), timeout: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html))

sets the timeout for a macro if the macro exists

#### Parameters

macroNamethe name of the macrotimeoutthe number of seconds to allow a script to run before canceling it; -1 indicates no timeout