#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <EditConstants.au3>
Local $hGUI1 = GUICreate("Gui 1",500,500)
Local $idedit = GUICtrlCreateEdit("", 0, 0,500,300, BitOR($ES_WANTRETURN, $WS_VSCROLL, $ES_AUTOVSCROLL))
Local $idMenu1 = GUICtrlCreateMenu("Работа с формами")
Local $idCreateForm = GUICtrlCreateMenuItem("Создать форму", $idMenu1)
GUISetState()
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
ExitLoop
Case $idCreateForm
gui2()
EndSwitch
WEnd
Func gui2()
Local $hGUI2 = GUICreate("Свойства формы", 350, 350)
GUICtrlCreateLabel("Имя формы",0,0)
Local $idInput_1 = GUICtrlCreateInput("",0,25,200)
GUICtrlCreateLabel("Имя обработчика",0,50)
Local $idInput_2 = GUICtrlCreateInput("",0,75,200)
GUICtrlCreateLabel("Идентификатор",0,100)
Local $idInput_3 = GUICtrlCreateInput("",0,125,200)
GUICtrlCreateLabel("Метод",0,150)
Local $idComboBox_1 = GUICtrlCreateCombo("",0,175,200)
GUICtrlSetData($idComboBox_1, "get|post")
GUICtrlCreateLabel("Способ кодирования",0,200)
Local $idComboBox_2 = GUICtrlCreateCombo("",0,225,200)
GUICtrlSetData($idComboBox_2, "text/plain|multipart/form-data|application/x-www-form-urlencoded")
Local $idComplete = GUICtrlCreateButton("Создать форму",0,275,200)
GUISetState()
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
GUIDelete($hGUI2)
ExitLoop
Case $idComplete
Local $nameform = GUICtrlRead($idInput_1)
Local $scriptname = GUICtrlRead($idInput_2)
Local $idform = GUICtrlRead($idInput_3)
Local $methodform = GUICtrlRead($idComboBox_1)
Local $enctypeform = GUICtrlRead($idComboBox_2)
Local $q = """"
Local $HtmlCode = " <form " & " action= " & $q & $scriptname & $q & " enctype= " & $q & $enctypeform & $q & " id= " & $q & $idform & $q & " method= " & $q & $methodform & $q & " name= " & $q & $nameform & $q & " > " & @CRLF & "</form>"
GUICtrlSetData($idedit,$HtmlCode)
GUIDelete($hGUI2)
ExitLoop
EndSwitch
WEnd
EndFunc
|