This script is almost 8 years old, the language has changed in that time. RunErrorsFatal has been removed from the options, you need to delete that line.
$GUI = GUICreate("Form1", 307, 439) Will create a window with the title Form1 that has 307pixels width and 439pixels height
$Label1 = GUICtrlCreateLabel("Message:", 8, 8, 50, 17) Will create a static Label control ,with the text "Message:",with left coordonate 8 and the right coordonate 8,width 50 pixels and height 17
$TextEdit = GUICtrlCreateEdit("", 8, 32, 289, 369) Will create an Edit control,with left 8px,top 32px,width 289px and height 369px
$SaveButton = GUICtrlCreateButton("Save", 112, 408, 75, 25) Will create a button with the text "Save", left 112px,top 408px,width 75px and height 25px
GUISetState(@SW_SHOW) Will set the GUI state as "Show"
$file=FileOpen("msg.txt",2) FileOpen opens a text file for reading or writing.
While 1 $nMsg = GUIGetMsg() Switch $nMsg Case -3 ;$GUI_EVENT_CLOSE Exit Case $SaveButton $data=GUICtrlRead($TextEdit) FileWrite($file,$data) FileClose($file) MsgBox(64, "Thank you","thanks we will respond soon") Exit EndSwitch Sleep(10) WEnd This is the main loop of the program
$nMsg = GUIGetMsg() Polls the GUI to see if any events have occurred.
Case -3 ;$GUI_EVENT_CLOSE Exit Check if the "x" (close) button is pressend and close the program
Case $SaveButton $data=GUICtrlRead($TextEdit) FileWrite($file,$data) FileClose($file) MsgBox(64, "Thank you","thanks we will respond soon") Exit Check if the "Save" button is pressed and then save the read the text from the Edit control($TextEdit) and save it into $data Then using FileWrite he write the $data into the file Then shows the MessageBox and exit Hope you understant something Sorry for my bad english. Here you can find all functions: http://www.autoitscript.com/autoit3/docs/functions.htm Here is the documentation: http://www.autoitscript.com/autoit3/docs/