How can I create a script? 

Go to the R/3 screen that you wish to modify. Click on Edit->Script in the GuiXT Menu. Now the text editor (Notepad) for the corresponding script is started.