;Окно на прокачку бицухи
Func _TwoWindow()
Global $Form7, $Group7, $Group8, $Group9, $fake, $Edit9, $idvk, $Button7, $Button8, $Button9, $aFake
$Form7 = GUICreate("Качаем бицуху", 625, 445, 192, 124)
$Group7 = GUICtrlCreateGroup("Список", 8, 8, 297, 425)
$fake = GUICtrlCreateEdit("", 16, 24, 273, 369)
GUICtrlSetState(-1, $GUI_DROPACCEPTED)
$Button7 = GUICtrlCreateButton("Извлечь из ...", 16, 400, 105, 25, $WS_GROUP)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group8 = GUICtrlCreateGroup("Пользователь", 328, 8, 281, 49)
$idvk = GUICtrlCreateInput($User, 344, 24, 249, 21)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group9 = GUICtrlCreateGroup("Информация", 328, 72, 281, 305)
$Edit9 = GUICtrlCreateEdit("", 336, 88, 257, 281)
GUICtrlSetState(-1, $GUI_DROPACCEPTED)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button8 = GUICtrlCreateButton("Получить", 328, 400, 129, 33, $WS_GROUP)
$Button9 = GUICtrlCreateButton("Закрыть", 480, 400, 129, 33, $WS_GROUP)
$sexit = GUICtrlDelete($Form7)
GUISetState(@SW_SHOW)
While 1
$smsg = GUIGetMsg();
Switch $smsg
Case $GUI_EVENT_CLOSE
GUIDelete($Form7)
ExitLoop
EndSwitch
Switch $smsg
Case $Button8
_Str($aFake)
GUISetState()
EndSwitch
Switch $smsg
Case $Button7
$text = FileOpenDialog("Указать файл", @WorkingDir & "", "Любой (*.txt)", 1 + 4 )
$Read = FileRead($text)
GUICtrlSetData($fake,$Read)
EndSwitch
Switch $smsg = $Button9
Case $GUI_EVENT_CLOSE
GUIDelete($Form7)
ExitLoop
EndSwitch
WEnd
EndFunc ;==> _TwoWindow
local $fake
$aFake = _GetArrey($fake)
If Not @error Then
_Str($aFake)
EndIf
;Бицуха
Func _Str($aArray)
local $Edit9
For $ii=1 To $aArray[0]
$key=StringSplit($aArray[$ii],':')
Local $PostData1 = ('sig=847df9498a90c30f8b3d6a5e3be33596&key='&$key[2]&'&friend_uid='&$User&'&user='&$key[1]&'&method=getFriendModels')
Local $PostData = ('sig=a253727a35bf937d6ce98d47d9818fa9&user='&$key[1]&'&sex=0&vote=5&username=lololo&model_id=1''&key='&$key[2]&'&friend_uid='&$User&'&method=voteForFriend')
$oHTTP.Open("POST", $GetModel)
$oHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded")
Execute('$oHTTP.Send($PostData1)')
$oHTTP.WaitForResponse
$Response = $oHTTP.ResponseText
$Return = StringRegExpReplace($Response, '(?s).*?<vote_availability>(d+)</vote_availability>?.*','\1')
if $Return = 1 Then
$oHTTP.setTimeouts(5000,5000, 10000, 10000)
$oHTTP.Open("POST", $GetStr)
$oHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded")
Execute('$oHTTP.Send($PostData)')
$oHTTP.WaitForResponse
$Edit9=GUICtrlSetData($Edit9, $Return)
Sleep(1000)
Else
Sleep(1000)
EndIf
Sleep(1000)
Next
EndFunc ;==> _Str
Func _GetArrey($fake)
Local $aArray, $sText
$sText = GUICtrlRead($fake)
If Not $sText Then Return SetError(1)
If StringInStr($sText, @LF) Then
$aArray = StringSplit(StringStripCR($sText), @LF)
ElseIf StringInStr($sText, @CR) Then
$aArray = StringSplit($sText, @CR)
Else
Dim $aArray[2] = [1, $sText]
EndIf
If Not IsArray($aArray) Then Return SetError(1)
Return SetError(0, 0, $aArray)
EndFunc ;==>_GetArray