Problem in running gui. command

I’m trying to run a script that has gui. command, and I get this error:
Line 1: evaluation error : Sourced file: inline evaluation of: ``gui.clearMessageWindow(); gui.message(“Hello”);’’ : Attempt to resolve method: clearMessageWindow() on undefined variable or class name: gui
I also tried
but didn’t work as well.

See: Undefined variable or class name: gui