this.inputscript => {
get input {
if (result = "blah") {
this.inputscript = null
// Run script
}
else {
do (this, "inputscript")
}
}
}
do (this, "inputscript")this.inputscript => {
get input {
if (result = "blah") {
this.inputscript = null
// Run script
}
else {
do (this, "inputscript")
}
}
}
on ready {
do (this, "inputscript")
}
OR
this.inputscript => {
get input {
if (result = "blah") {
this.inputscript = null
// Run script
}
else {
do (this, "inputscript")
}
}
}
do (this, "inputscript")
on ready {
(whatever)
}
OR
on ready {
this.inputscript => {
get input {
if (result = "blah") {
this.inputscript = null
// Run script
}
else {
do (this, "inputscript")
}
}
}
}
do (this, "inputscript")
OR
on ready {
this.inputscript => {
get input {
if (result = "blah") {
this.inputscript = null
// Run script
}
else {
do (this, "inputscript")
}
}
}
do (this, "inputscript")
}
~I can't remember and always get confused off the top of my head on the correct format~syntax for how to use "on ready", lol
<function name="Expect" parameters="expected,postscript">
get input {
if (result = expected) {
params = NewDictionary()
dictionary add(params, "result", result)
do(postscript, params)
} else {
msg("Try again...")
Expect(expected, postscript)
}
}
</function>Expect("Hello") {
msg("You typed Hello!")
msg("See: the result is " + result)
}jaynabonne wrote:Actually, since you're invoking loop1 in the default of the switch statement, you don't need the turn script at all as far as I can see.
case ("exit loop") {
msg ("You have left the loop.")
}
case ("leave loop") {
msg ("You have left the loop.")
} case ("exit loop", "leave loop") {
msg ("You have left the loop.")
}