#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <ButtonConstants.au3>
#include <StaticConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Нычки", 269, 230, 192, 124)
GUISetBkColor(0x00FF00)
Global $iEventError = 0
$oHTTP = ObjCreate("WinHttp.WinHttpRequest.5.1")
$oWinHttpError = ObjEvent("AutoIt.Error", "_WinHttpErrorHandler")
$sINI = @ScriptDir & '\config.ini'
$bUser11 = IniRead($sINI, "Config", "ryadn", "")
$mUser1 = IniRead($sINI, "Config", "idn", "")
$sUser65 = IniRead($sINI, "Config", "Vid", "")
$id_feika1 = IniRead($sINI, "Config", "idfeika", "")
$auth_feika1 = IniRead($sINI, "Config", "authfeika", "")
$Button1 = GUICtrlCreateButton("Передать нычки", 16, 104, 217, 49, BitOR($BS_MULTILINE,$WS_BORDER,$WS_CLIPSIBLINGS))
$authf = GUICtrlCreateInput($auth_feika1, 16, 8, 217, 21)
$idf = GUICtrlCreateInput($id_feika1, 16, 40, 57, 21)
$idn = GUICtrlCreateInput($mUser1, 500, 40, 57, 21)
$ryad = GUICtrlCreateInput($bUser11, 500, 72, 57, 21)
$Label1 = GUICtrlCreateLabel("by CreAtiK", 32, 168, 182, 43)
GUICtrlSetFont(-1, 30, 400, 0, "Narkisim")
$Label2 = GUICtrlCreateLabel("Ваш id", 88, 72, 59, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$Label3 = GUICtrlCreateLabel("id фейка ", 88, 40, 83, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
GUISetState(@SW_DISABLE)
$aUsers = StringSplit(GUICtrlRead($idn), ",")
$sUsers = StringSplit(GUICtrlRead($ryad), ",")
$dUsers = StringSplit(GUICtrlRead($idf), ",")
$fUsers = StringSplit(GUICtrlRead($authf), ",")
_My_Func($aUsers)
GUISetState(@SW_ENABLE)
EndSwitch
WEnd
Func _My_Func($aUsers)
$URL = "http://109.234.155.196/prison/universal.php"
For $i = 1 To $aUsers[0]
$PostData = _
"cid=" & $sUsers [$i] & _
"&friend=" &$sUser65 &"&sig=020f34f41496b01af7309dde9c6b0785&user="& $dUsers [$i] & _
"&id=" & $aUsers [$i] & _
"&key=" & $fUsers [$i] & _
"&method=collectionsSendGiftToFriend"
$oHTTP.Open("POST", $URL)
$oHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded")
$oHTTP.Send($PostData)
If $iEventError Then
$oHTTP.WaitForResponse
EndIf
Next
EndFunc
Func _WinHttpErrorHandler()
$iEventError = $oWinHttpError.Number
EndFunc