Newbie Question About Writing Functions

I have a script where I noticed I’m using the same set of commands in the same order a few times. I’d like to write a function where I can put these commands and call the function when I need them. How do I do that?

Thanks,
Dave

You can write this as a handler.


to someHandler
     // do something in here

     // optional return value
     return someValue
end someHandler

You can find additional examples of handlers as well as usage in the “Using Eggplant” manual. Refer to the chapter titled “Reusing Code”.