Код:
#include <GUIConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Ренеймер Perfect World ", 327, 185, 265, 204)
$Button1 = GUICtrlCreateButton("Ренейм", 8, 8, 313, 121, 0)
GUICtrlSetFont(-1, 38, 800, 4, "Microsoft Sans Serif")
$Button2 = GUICtrlCreateButton("Автологин", 8, 136, 315, 41, 0)
GUICtrlSetFont(-1, 18, 400, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
If $nMsg = $Button1 Then
$Button1 WinSetTitle ("Perfect World", "", "PW:D")
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
WEnd
EndSwitch
While 2
$nMsg = GUIGetMsg()
If $nMsg = $Button2 Then
$Button2 WinWaitActive ("PW:D", "")
send ("{ENTER}")
send ("login")
send ("{TAB}")
send ("password")
send ("{ENTER}")
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
WEnd
EndSwitch
подскажите что нетак :-\