Hello World
All these samples were taken directly from: http://www.easyuo.com/forum/viewtopic.php?t=43202 and just cruising the forums to give them a little explanation.
Let's start by running a version of OpenEUO. The version used was 0.9s and the samples should be compatible with subsequent release(s).
1st sample:
Print("Hello World!")
This reminds of programming in BASIC back in the old days. But it would like: 10 Print "Hello World!"
2nd sample:
UO.CliNr = 1 UO.Macro(8,2,) wait(1000) UO.Msg("Hi, my name is " .. UO.CharName .. "!\n") print("UO.CharName = " .. UO.CharName)
UO.CliNr = 1 - selects which client will be running this short sample
UO.Macro(8,2,) - initiates a client-side macro (see UO.Macro for options)
wait(1000) - 1 second delay
UO.Msg("Hi, my name is " .. UO.CharName .. "!\n") - the character running in the first client will saying this statement.
print("UO.CharName = " .. UO.CharName) - display this output in the application message thread
3rd sample:
Form1 = Obj.Create("TForm")
Form1.Caption = "Hey, it works!"
Form1.OnClose = function() Obj.Exit() end
Form1.Show()
Obj.Loop()
This will create a window that closes when the running script is stopped. The window is sizable and can be relocated in an viewable potion of the screen, just like a window in the Graphic User Interface (GUI).