#include <GUIConstants.au3>
#include <EditConstants.au3>
#include <IniString.au3>
GUICreate('Title', 400, 300)
$hLogin = GUICtrlCreateInput('', 50, 50, 120)
$hPassword = GUICtrlCreateInput('', 50, 100, 120, 21, $ES_PASSWORD)
$hButton = GUICtrlCreateButton('Run', 50, 150, 80)
GUISetState()
While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
Exit
Case $msg = $hButton
$sLog = GUICtrlRead($hLogin)
$sPass = GUICtrlRead($hPassword)
$iControl = _Validate_Password($sLog, $sPass)
If Not @error Then
If $iControl Then
MsgBox(64, 'Info', 'Все OK')
Else
MsgBox(16, 'Ошибка', 'Пароль неправильный')
Exit
EndIf
Else
MsgBox(16, 'Ошибка', 'Произошла ошибка, попробуйте еще раз')
Exit
EndIf
MsgBox(64, 'Info', 'Работаем дальше')
EndSelect
WEnd
Func _Validate_Password($s_Login, $s_Password)
Local $s_TextFromSite, $s_Url = 'http://dl.dropbox.com/u/26599219/Password.ini', _; Ваша ссылка
$s_Control_Pass, $s_Section = 'Login_Password'
$s_TextFromSite = InetRead($s_Url, 17)
If @error Then Return SetError(1)
$s_TextFromSite = BinaryToString($s_TextFromSite)
$s_Control_Pass = _IniString_Read($s_TextFromSite, $s_Section, $s_Login, 'Error')
Return SetError(0, 0, $s_Control_Pass = $s_Password)
EndFunc ;==>_Validate_Password