As i promised, here is it. Sorry for not posting it before but i was really busy.
It basically explains some of the current scripting engine and how to script a GUI too. I used some of Stefan's explanations about some commands so you people will get it easily. Hope this basic document can help.
Thanks for ZH and Wan for helping some way.