Feature #1177
Mis à jour par Serge Heiden il y a environ 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@ $HOME/TXM/scripts/user/start.groovy and @$HOME/TXM/scripts/user/stop.groovy@ $HOME/TXM/scripts/user/stop.groovy Groovy scripts with the following content: contents :
* start.groovy:
<pre>
def f = new File("tmp.txt")
println "Writting 'CUSTOM START MESSAGE' IN "+f.getAbsolutePath()
f.println "CUSTOM START MESSAGE"
</pre>
* stop.groovy:
and
<pre>
new File("tmp.txt") << "CUSTOM END MESSAGE"
</pre>
Run TXM and quit.
The "tmp.txt" file must contain 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@ $HOME/TXM/scripts/user/start.groovy and @$HOME/TXM/scripts/user/stop.groovy@ $HOME/TXM/scripts/user/stop.groovy Groovy scripts with the following content: contents :
* start.groovy:
<pre>
def f = new File("tmp.txt")
println "Writting 'CUSTOM START MESSAGE' IN "+f.getAbsolutePath()
f.println "CUSTOM START MESSAGE"
</pre>
* stop.groovy:
and
<pre>
new File("tmp.txt") << "CUSTOM END MESSAGE"
</pre>
Run TXM and quit.
The "tmp.txt" file must contain contains (its path is written in the console when TXM starts)
<pre>
CUSTOM START MESSAGE
CUSTOM END MESSAGE
</pre>