Feature #1177
Mis à jour par Matthieu Decorde il y a plus de 9 ans
If present, execute the $TXMHOME/scripts/user/start.groovy script just before the "Ready." message display (after the Toolbox has been initialized).
If present, execute the $TXMHOME/scripts/user/stop.groovy script just before TXM call Toolbox.shutdown()
The 2 scripts must be modal.
h3. Validation test
create the $HOME/TXM/scripts/user/start.groovy and $HOME/TXM/scripts/user/stop.groovy Groovy scripts with contents :
<pre>
def f = new File("tmp.txt")
println "Writting 'CUSTOM START MESSAGE' IN "+f.getAbsolutePath()
f.println "CUSTOM START MESSAGE"
</pre>
and
<pre>
new File("tmp.txt") << "CUSTOM END MESSAGE"
</pre>
Run TXM and quit.
The "tmp.txt" file must contains (its path is written in the console when TXM starts)
<pre>
CUSTOM START MESSAGE
CUSTOM END MESSAGE
</pre>
If present, execute the $TXMHOME/scripts/user/stop.groovy script just before TXM call Toolbox.shutdown()
The 2 scripts must be modal.
h3. Validation test
create the $HOME/TXM/scripts/user/start.groovy and $HOME/TXM/scripts/user/stop.groovy Groovy scripts with contents :
<pre>
def f = new File("tmp.txt")
println "Writting 'CUSTOM START MESSAGE' IN "+f.getAbsolutePath()
f.println "CUSTOM START MESSAGE"
</pre>
and
<pre>
new File("tmp.txt") << "CUSTOM END MESSAGE"
</pre>
Run TXM and quit.
The "tmp.txt" file must contains (its path is written in the console when TXM starts)
<pre>
CUSTOM START MESSAGE
CUSTOM END MESSAGE
</pre>