Hi all,
Firstly, wonderful program! I spent a few weeks relying on the ssScriptMaker program and had some fun there, but then I tried some actual groovy script. Wow. It's awesome, isn't it?
With that in mind, I'd like to show you a neat closure I've come up with to make my life a little easier. See what you think:
Code:
def showFor = {
showUntil, showText ->
show(showText)
if (showUntil.toString().isInteger()) {
this.wait(showUntil.toInteger())
} else {
showButton(showUntil)
}
}
showFor("Yes, Master","Are you ready to begin?") // Shows the question and waits for the "Yes, Master" button to be clicked
showFor(60, "Stand in the corner for 1 minute") // Shows the text for 60 secs
I find it saves me a bit of time and a lot of space, particularly with the kinds of scripts that I write (mostly image slideshows with bossing about, humiliation and general mockery)
So, have you guys got any other quick tricks like this to share?
LMW