Имя пользователя:
Пароль:
 

Показать сообщение отдельно

Ветеран


Сообщения: 27449
Благодарности: 8088

Профиль | Отправить PM | Цитировать


Замена первой строки может выглядеть, например, так (без проверки ввода):
читать дальше »
Код: Выделить весь код
#NoTrayIcon

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Include <Array.au3>

AutoItSetOption("MustDeclareVars", 1)

Local $Form1   = GUICreate("Form1", 306, 208, 192, 169)
Local $Edit1   = GUICtrlCreateEdit(StringFormat("One\r\nTwo\r\nThree\r\nFour\r\nFive\r\nSix\r\nSeven\r\nEight"), 8, 8, 169, 185)
Local $Button1 = GUICtrlCreateButton("Button1", 184, 8, 113, 33, $WS_GROUP)

Local $nMsg
Local $aValue

GUISetState(@SW_SHOW)

While 1
	$nMsg = GUIGetMsg()

	Switch $nMsg
		Case $GUI_EVENT_CLOSE
			Exit
		Case $Button1
			$aValue = StringSplit(GUICtrlRead($Edit1), @CR, 2)
			$aValue[0] = InputBox("Переименовать секцию", "Введите имя секции", $aValue[0])
			GUICtrlSetData($Edit1, _ArrayToString($aValue, @CR))
	EndSwitch
WEnd

но мне не нравится Ваша реализация в целом.

Отправлено: 15:43, 01-09-2013 | #3