Что нового

GUI интерфейс взаимодействия с пользователем

Gorenich

ГорыНыЧ
Сообщения
38
Репутация
0
Версия AutoIt: 3.
Здравствуйте!
Помогите пожалуйста!
Описание:
Скрипт заходит на сайт, вводит логин и пароль с базы ,в базе где-то 500 офисов.Бывает нужно запустить скрипт с определенного офиса,а не с 1 по 500
Как сделать чтобы при первом запуске спрашивало с какого офиса начать?
И в треи чтобы висело в какой офис(логин) он вошел.
Примечания:
Код AutoIt:
Код:
#include <IE.au3>

Opt('TrayAutoPause', 0)

HotKeySet('{Esc}', '_Exit')

TraySetIcon('shell32.dll', 44)
TraySetToolTip('Работает')


$varsetting = IniReadSectionNames("setting.ini")
$varzapros = IniReadSection("zapros.ini", "1")
$block = 5 ; блокировать файлы «cookie»
$unbock= 1 ; разблокировать файлы «cookie»
$site = "http://vservices.acesse.com/memberLogin.php?service=12" ; сайт
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\P3P\History\" & $site,"","REG_DWORD",$block)


for $w = 1 to $varsetting[0]
	$var1 = IniRead("setting.ini", $w, "1", "NotFound")
    $var2 = IniRead("setting.ini", $w, "2", "NotFound")
 $oIE = _IECreate("http://vservices.acesse.com/memberLogin.php?service=12",1,1,1,1)

 $text = 2
 _IEzap($oIE,0,1,$var1)
 _IEzap($oIE,0,2,$var2)
 sleep(100)
 _IEclick($oIE,0,3,"Login")
 sleep(25000)
База :
Код:
[1]
1=логин
2=пароль
[2]
1=логин
2=пароль
[3]
1=логин
2=пароль

Заранее большое спасибо!
 

madmasles

Модератор
Глобальный модератор
Сообщения
7,790
Репутация
2,322
Gorenich,
Дайте хотя бы один тестовый логин-пароль (можно в ЛС). Что означает
Gorenich [?]
запустить скрипт с определенного офиса,а не с 1 по 500
Что конкретно должны делать функции _IEzap() и _IEclick()?
 
Автор
G

Gorenich

ГорыНыЧ
Сообщения
38
Репутация
0
логин 151334
пароль Gorenich1988



Добавлено:
Сообщение автоматически объединено:

"запустить скрипт с определенного офиса,а не с 1 по 500"
При запуске скрипт заходит в офисы по очереди с 1 по 500
А бывает нужно чтобы он заходил не с 1 ,а например с 50
Поэтому нужно чтобы он спрашивал с какого офиса он будет входить.
 
Автор
G

Gorenich

ГорыНыЧ
Сообщения
38
Репутация
0
Подскажите в каком направлении хоть смотреть!
 

Renz

Осваивающий
Сообщения
63
Репутация
37
Я думаю надо начать примерно так:
Код:
Const $fSetup = "C:\setting.ini"
While 1
	$sInputOf = InputBox("Номер офиса", "Введите номер офиса", "")
	If $sInputOf = "" Then
		$zapr = MsgBox(4,"","Продолжить ввод номера офиса?")
		If $zapr = 6 Then
			ContinueLoop
		Else
			Exit
		EndIf
	ElseIf IsNumber(Number(StringStripWS( $sInputOf, 8))) <> 1 Then
		MsgBox(0,"","Введенные данные не число!")
		ContinueLoop
	Else
		$iNomerOf = Number(StringStripWS( $sInputOf, 8))
		$aOfis = IniReadSection ( $fSetup, $iNomerOf )
		If @error = 1 Then
			MsgBox(0, "ошибка", "Введен несуществующий номер офиса ")
			ContinueLoop
		ElseIf $aOfis[0][0] < 2  Or $aOfis[0][0] > 2 Then
			MsgBox(0, "ошибка", "Ошибка в файле настроек")
			exit
		Else
			$sLogin = $aOfis[1][1]
			$sPass = $aOfis[2][1]
			ExitLoop
		EndIf
         EndIf
WEnd
 

madmasles

Модератор
Глобальный модератор
Сообщения
7,790
Репутация
2,322
Gorenich,
Можно так попробовать начать, а про запросы я ответа так и не дождался.
Код:
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <IE.au3>

Opt('MustDeclareVars', 1)
Opt('TrayMenuMode', 1)

Global $sTitle = 'Vservices', $aLogin, $iNumberStart, $oIE

If WinExists($sTitle & '{[/@$@\]}') Then Exit
AutoItWinSetTitle($sTitle & '{[/@$@\]}')

_Get_Array_Login($aLogin)
If @error Then
	MsgBox(16, 'Error', '_Get_Array_Login')
	Exit
EndIf

_InputBox($aLogin[0][0], $iNumberStart)

For $i = $iNumberStart To $aLogin[0][0]
	_Login_Vservices($aLogin, $i, $oIE)
	If @error Then ContinueLoop
	MsgBox(64, 'Info', 'Здесь можно что-то искать хоть в цикле, хоть один раз')
Next
If IsObj($oIE) Then _IEQuit($oIE)
MsgBox(64, 'Info', 'Все')

Func _Get_Array_Login(ByRef $a_Array)
	Local $s_FileIni = @ScriptDir & '\setting.ini', $a_SectionNames, $a_Section, $i_Count, $f_Yes

	If Not FileExists($s_FileIni) Then Return SetError(1)
	$a_SectionNames = IniReadSectionNames($s_FileIni)
	If @error Then Return SetError(1)
	If IsArray($a_Array) Then $a_Array = 0
	Dim $a_Array[$a_SectionNames[0] + 1][2]
	For $i = 1 To $a_SectionNames[0]
		$a_Section = IniReadSection($s_FileIni, $a_SectionNames[$i])
		If @error Then ContinueLoop
		If $a_Section[0][0] <> 2 Then ContinueLoop
		$f_Yes = True
		For $j = 1 To $a_Section[0][0]
			If Not $a_Section[$j][1] Then
				$f_Yes = False
				ExitLoop
			EndIf
		Next
		If $f_Yes Then
			$i_Count += 1
			For $j = 0 To 1
				$a_Array[$i_Count][$j] = $a_Section[$j + 1][1]
			Next
		EndIf
	Next
	If Not $i_Count Then Return SetError(1)
	ReDim $a_Array[$i_Count + 1][2]
	$a_Array[0][0] = $i_Count
EndFunc   ;==>_Get_Array_Login

Func _InputBox($i_Max, ByRef $i_Number)
	Local $h_Gui, $nInputBox, $nOk, $nCancel, $sInput
	$h_Gui = GUICreate($sTitle, 250, 120, -1, -1, $WS_OVERLAPPED, BitOR($WS_EX_TOOLWINDOW, $WS_EX_TOPMOST))
	GUICtrlCreateLabel('Введите номер, с которого начнем (max = ' & $i_Max & '):', 5, 10, 230, 18, $ES_CENTER)
	$nInputBox = GUICtrlCreateInput('1', 100, 30, 50, 20, BitOR($ES_NUMBER, $ES_CENTER))
	$nOk = GUICtrlCreateButton('OK', 40, 60, 65, 25)
	GUICtrlSetTip(-1, 'Выбрать введенный номер')
	GUICtrlSetCursor(-1, 0)
	$nCancel = GUICtrlCreateButton('Выход', 145, 60, 65, 25)
	GUICtrlSetTip(-1, 'Выход из программы')
	GUICtrlSetCursor(-1, 0)
	GUISetState()

	While 1
		$sInput = GUICtrlRead($nInputBox)
		If Number($sInput) > $i_Max Then
			GUICtrlSetData($nInputBox, $i_Max)
		EndIf
		Switch GUIGetMsg()
			Case $GUI_EVENT_CLOSE, $nCancel
				If MsgBox(36, $sTitle, 'Вы уверены, что хотите выйти из программы?', 0, $h_Gui) = 6 Then Exit
			Case $nOk
				$sInput = GUICtrlRead($nInputBox)
				If Number($sInput) Then
					$i_Number = $sInput
					GUIDelete($h_Gui)
					Return
				EndIf
		EndSwitch
	WEnd
EndFunc   ;==>_InputBox

Func _Login_Vservices($a_Array, $i_Index, ByRef $o_Obj)
	Local $s_Url_Avtor = 'http://vservices.acesse.com/memberLogin.php?service=12', $o_Form, _
			$o_Inputs, $s_Url_After, $i_Error = 1

	If IsObj($o_Obj) Then
		_IEQuit($o_Obj)
		If @error Then Return SetError(1)
	EndIf
	$o_Obj = _IECreate()
	If @error Then Return SetError(1)
	For $i = 1 To 1
		_IENavigate($o_Obj, $s_Url_Avtor)
		If @error Then ExitLoop
		$o_Form = _IEFormGetCollection($o_Obj, 0)
		If @error Then ExitLoop
		$o_Inputs = _IETagNameGetCollection($o_Form, 'input')
		If @error Then ExitLoop
		For $o_Input In $o_Inputs
			If $o_Input.type == 'text' Then
				_IEFormElementSetValue($o_Input, $a_Array[$i_Index][0])
				If @error Then ExitLoop 2
			EndIf
			If $o_Input.type == 'password' Then
				_IEFormElementSetValue($o_Input, $a_Array[$i_Index][1])
				If @error Then ExitLoop 2
			EndIf
		Next
		_IEFormSubmit($o_Form, 0)
		If @error Then ExitLoop
		_IELoadWait($o_Obj)
		$s_Url_After = _IEPropertyGet($o_Obj, 'locationurl')
		If @error Then ExitLoop
		If $s_Url_After == $s_Url_Avtor Then ExitLoop
		$i_Error = 0
	Next
	Return SetError($i_Error)
EndFunc   ;==>_Login_Vservices
 
Автор
G

Gorenich

ГорыНыЧ
Сообщения
38
Репутация
0
Извините что не ответил!
Это поисковик!
И в нем база поисковых запросов!
Что будет искать!
 

madmasles

Модератор
Глобальный модератор
Сообщения
7,790
Репутация
2,322
Gorenich [?]
Это поисковик!
И в нем база поисковых запросов!
Что будет искать!
В каком виде эта база? Сколько запросов от имени каждого пользователя делать? Что делать с результатами поиска? И т.д. и т.п., чем подробнее, тем лучше.
 
Автор
G

Gorenich

ГорыНыЧ
Сообщения
38
Репутация
0
Вам огромнейшее спасибо!

Я базу убрал просто сделал ссылки
Код:
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <IE.au3>

Opt('MustDeclareVars', 1)
Opt('TrayMenuMode', 0)

Global $sTitle = 'Vservices', $aLogin, $iNumberStart, $oIE

If WinExists($sTitle & '{[/@$@\]}') Then Exit
AutoItWinSetTitle($sTitle & '{[/@$@\]}')

_Get_Array_Login($aLogin)
If @error Then
    MsgBox(16, 'Error', '_Get_Array_Login')
    Exit
EndIf

_InputBox($aLogin[0][0], $iNumberStart)

For $i = $iNumberStart To $aLogin[0][0]
    _Login_Vservices($aLogin, $i, $oIE)
    If @error Then ContinueLoop
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich1&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich2&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich3&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich4&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich5&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich6&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich7&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich8&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich9&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich10&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich11&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich12&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich13&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich14&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich15&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich16&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich17&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich18&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich19&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich20&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich21&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich22&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich23&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich24&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich25&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich26&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich27&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich28&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich29&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich30&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich31&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich32&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich33&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich34&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich35&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich36&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich37&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich38&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich39&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich40&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich41&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich42&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich43&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich44&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich45&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich46&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich47&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich48&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich49&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich50&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich51&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich52&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich53&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich54&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich55&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich56&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich57&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich58&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich59&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich60&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich61&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich62&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich63&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich64&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich65&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich66&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich67&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich68&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich69&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich70&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich71&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich72&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich73&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich74&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich75&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich76&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich77&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich78&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich79&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich80&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich81&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich82&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich83&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich84&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich85&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich86&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich87&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich88&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich89&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich90&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich91&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich92&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich93&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich94&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich95&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich96&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich97&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich98&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich99&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich100&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich101&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich102&type=web", 0)
Sleep(250)
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=gorenich103&type=web", 0)
Next
If IsObj($oIE) Then _IEQuit($oIE)
MsgBox(64, 'Info', 'Все')

Func _Get_Array_Login(ByRef $a_Array)
    Local $s_FileIni = @ScriptDir & '\setting.ini', $a_SectionNames, $a_Section, $i_Count, $f_Yes

    If Not FileExists($s_FileIni) Then Return SetError(1)
    $a_SectionNames = IniReadSectionNames($s_FileIni)
    If @error Then Return SetError(1)
    If IsArray($a_Array) Then $a_Array = 0
    Dim $a_Array[$a_SectionNames[0] + 1][2]
    For $i = 1 To $a_SectionNames[0]
        $a_Section = IniReadSection($s_FileIni, $a_SectionNames[$i])
        If @error Then ContinueLoop
        If $a_Section[0][0] <> 2 Then ContinueLoop
        $f_Yes = True
        For $j = 1 To $a_Section[0][0]
            If Not $a_Section[$j][1] Then
                $f_Yes = False
                ExitLoop
            EndIf
        Next
        If $f_Yes Then
            $i_Count += 1
            For $j = 0 To 1
                $a_Array[$i_Count][$j] = $a_Section[$j + 1][1]
            Next
        EndIf
    Next
    If Not $i_Count Then Return SetError(1)
    ReDim $a_Array[$i_Count + 1][2]
    $a_Array[0][0] = $i_Count
EndFunc   ;==>_Get_Array_Login

Func _InputBox($i_Max, ByRef $i_Number)
    Local $h_Gui, $nInputBox, $nOk, $nCancel, $sInput
    $h_Gui = GUICreate($sTitle, 250, 120, -1, -1, $WS_OVERLAPPED, BitOR($WS_EX_TOOLWINDOW, $WS_EX_TOPMOST))
    GUICtrlCreateLabel('Введите номер, с которого начнем (max = ' & $i_Max & '):', 5, 10, 230, 18, $ES_CENTER)
    $nInputBox = GUICtrlCreateInput('1', 100, 30, 50, 20, BitOR($ES_NUMBER, $ES_CENTER))
    $nOk = GUICtrlCreateButton('OK', 40, 60, 65, 25)
    GUICtrlSetTip(-1, 'Выбрать введенный номер')
    GUICtrlSetCursor(-1, 0)
    $nCancel = GUICtrlCreateButton('Выход', 145, 60, 65, 25)
    GUICtrlSetTip(-1, 'Выход из программы')
    GUICtrlSetCursor(-1, 0)
    GUISetState()

    While 1
        $sInput = GUICtrlRead($nInputBox)
        If Number($sInput) > $i_Max Then
            GUICtrlSetData($nInputBox, $i_Max)
        EndIf
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE, $nCancel
                If MsgBox(36, $sTitle, 'Вы уверены, что хотите выйти из программы?', 0, $h_Gui) = 6 Then Exit
            Case $nOk
                $sInput = GUICtrlRead($nInputBox)
                If Number($sInput) Then
                    $i_Number = $sInput
                    GUIDelete($h_Gui)
                    Return
                EndIf
        EndSwitch
    WEnd
EndFunc   ;==>_InputBox

Func _Login_Vservices($a_Array, $i_Index, ByRef $o_Obj)
    Local $s_Url_Avtor = 'http://vservices.acesse.com/memberLogin.php?service=12', $o_Form, _
            $o_Inputs, $s_Url_After, $i_Error = 1

    If IsObj($o_Obj) Then
        _IEQuit($o_Obj)
        If @error Then Return SetError(1)
    EndIf
    $o_Obj = _IECreate()
    If @error Then Return SetError(1)
    For $i = 1 To 1
        _IENavigate($o_Obj, $s_Url_Avtor)
        If @error Then ExitLoop
        $o_Form = _IEFormGetCollection($o_Obj, 0)
        If @error Then ExitLoop
        $o_Inputs = _IETagNameGetCollection($o_Form, 'input')
        If @error Then ExitLoop
        For $o_Input In $o_Inputs
            If $o_Input.type == 'text' Then
                _IEFormElementSetValue($o_Input, $a_Array[$i_Index][0])
                If @error Then ExitLoop 2
            EndIf
            If $o_Input.type == 'password' Then
                _IEFormElementSetValue($o_Input, $a_Array[$i_Index][1])
                If @error Then ExitLoop 2
            EndIf
        Next
        _IEFormSubmit($o_Form, 0)
        If @error Then ExitLoop
        _IELoadWait($o_Obj)
        $s_Url_After = _IEPropertyGet($o_Obj, 'locationurl')
        If @error Then ExitLoop
        If $s_Url_After == $s_Url_Avtor Then ExitLoop
        $i_Error = 0
Sleep(250)
    Next
    Return SetError($i_Error)
EndFunc   ;==>_Login_Vservices
В следующий офис не заходит!
Как поставить чтобы после каждого офиса куки очищались?
 

axlwor

Скриптер
Сообщения
657
Репутация
147
попробуй выполнить это
Код:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2
 

madmasles

Модератор
Глобальный модератор
Сообщения
7,790
Репутация
2,322
Gorenich [?]
В следующий офис не заходит!
Как поставить чтобы после каждого офиса куки очищались?
Попробуйте так, у меня на XP работает.
Код:
;...
#include <File.au3>
;...

;...
For $i = $iNumberStart To $aLogin[0][0]
	_Del_Cookie()
	_Login_Vservices($aLogin, $i, $oIE)
	If @error Then ContinueLoop
	For $j = 1 To 100
		_IENavigate($oIE, 'http://acesse.com/index.php?page=search/noresults&search=gorenich' & $j & '&type=web')
		Sleep(1000) ;только чтобы увидеть результат
	Next
Next
If IsObj($oIE) Then _IEQuit($oIE)
MsgBox(64, 'Info', 'Все')
_Del_Cookie()
;...

;...
Func _Del_Cookie()
	Local $a_Files_Cookie, $s_Path = @UserProfileDir & '\Cookies', $s_ControlString = 'acesse.com/', _
			$s_Read

	$a_Files_Cookie = _FileListToArray($s_Path, '*.txt', 1)
	If @error Then Return
	For $i = 1 To $a_Files_Cookie[0]
		$s_Read = FileRead($s_Path & '\' & $a_Files_Cookie[$i])
		If StringInStr($s_Read, $s_ControlString) Then
			ConsoleWrite(FileDelete($s_Path & '\' & $a_Files_Cookie[$i]) & @LF)
		EndIf
	Next
EndFunc   ;==>_Del_Cookie
 
Автор
G

Gorenich

ГорыНыЧ
Сообщения
38
Репутация
0
Не помогло!Не чистит куки!
Как можно чтобы все куки стереть,мне все не нужны?


Добавлено:
Сообщение автоматически объединено:

Или может я накосячил в сборке скрипта
Код:
#include <IE.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <File.au3>

Opt('MustDeclareVars', 1)
Opt('TrayMenuMode', 0)

Global $sTitle = 'Vservices', $aLogin, $iNumberStart, $oIE

If WinExists($sTitle & '{[/@$@\]}') Then Exit
AutoItWinSetTitle($sTitle & '{[/@$@\]}')

_Get_Array_Login($aLogin)
If @error Then
    MsgBox(16, 'Error', '_Get_Array_Login')
    Exit
EndIf
_InputBox($aLogin[0][0], $iNumberStart)
For $i = $iNumberStart To $aLogin[0][0]
    _Del_Cookie()
    _Login_Vservices($aLogin, $i, $oIE)
    If @error Then ContinueLoop
    For $j = 1 To 100
        _IENavigate($oIE, 'http://acesse.com/index.php?page=search/noresults&search=gorenich' & $j & '&type=web')
		Next
_Del_Cookie()
Next
Func _Del_Cookie()
    Local $a_Files_Cookie, $s_Path = @UserProfileDir & '\Cookies', $s_ControlString = 'vservices.acesse.com/', _
            $s_Read
    $a_Files_Cookie = _FileListToArray($s_Path, '*.txt', 1)
    If @error Then Return
    For $i = 1 To $a_Files_Cookie[0]
        $s_Read = FileRead($s_Path & '\' & $a_Files_Cookie[$i])
        If StringInStr($s_Read, $s_ControlString) Then
            ConsoleWrite(FileDelete($s_Path & '\' & $a_Files_Cookie[$i]) & @LF)
        EndIf
    Next
EndFunc   ;==>_Del_Cookie
If IsObj($oIE) Then _IEQuit($oIE)
MsgBox(64, 'Info', 'Все')

Func _Get_Array_Login(ByRef $a_Array)
    Local $s_FileIni = @ScriptDir & '\setting.ini', $a_SectionNames, $a_Section, $i_Count, $f_Yes

    If Not FileExists($s_FileIni) Then Return SetError(1)
    $a_SectionNames = IniReadSectionNames($s_FileIni)
    If @error Then Return SetError(1)
    If IsArray($a_Array) Then $a_Array = 0
    Dim $a_Array[$a_SectionNames[0] + 1][2]
    For $i = 1 To $a_SectionNames[0]
        $a_Section = IniReadSection($s_FileIni, $a_SectionNames[$i])
        If @error Then ContinueLoop
        If $a_Section[0][0] <> 2 Then ContinueLoop
        $f_Yes = True
        For $j = 1 To $a_Section[0][0]
            If Not $a_Section[$j][1] Then
                $f_Yes = False
                ExitLoop
            EndIf
        Next
        If $f_Yes Then
            $i_Count += 1
            For $j = 0 To 1
                $a_Array[$i_Count][$j] = $a_Section[$j + 1][1]
            Next
        EndIf
    Next
    If Not $i_Count Then Return SetError(1)
    ReDim $a_Array[$i_Count + 1][2]
    $a_Array[0][0] = $i_Count
EndFunc   ;==>_Get_Array_Login

Func _InputBox($i_Max, ByRef $i_Number)
    Local $h_Gui, $nInputBox, $nOk, $nCancel, $sInput
    $h_Gui = GUICreate($sTitle, 250, 120, -1, -1, $WS_OVERLAPPED, BitOR($WS_EX_TOOLWINDOW, $WS_EX_TOPMOST))
    GUICtrlCreateLabel('Введите номер, с которого начнем (max = ' & $i_Max & '):', 5, 10, 230, 18, $ES_CENTER)
    $nInputBox = GUICtrlCreateInput('1', 100, 30, 50, 20, BitOR($ES_NUMBER, $ES_CENTER))
    $nOk = GUICtrlCreateButton('OK', 40, 60, 65, 25)
    GUICtrlSetTip(-1, 'Выбрать введенный номер')
    GUICtrlSetCursor(-1, 0)
    $nCancel = GUICtrlCreateButton('Выход', 145, 60, 65, 25)
    GUICtrlSetTip(-1, 'Выход из программы')
    GUICtrlSetCursor(-1, 0)
    GUISetState()

    While 1
        $sInput = GUICtrlRead($nInputBox)
        If Number($sInput) > $i_Max Then
            GUICtrlSetData($nInputBox, $i_Max)
        EndIf
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE, $nCancel
                If MsgBox(36, $sTitle, 'Вы уверены, что хотите выйти из программы?', 0, $h_Gui) = 6 Then Exit
            Case $nOk
                $sInput = GUICtrlRead($nInputBox)
                If Number($sInput) Then
                    $i_Number = $sInput
                    GUIDelete($h_Gui)
                    Return
                EndIf
        EndSwitch
    WEnd
EndFunc   ;==>_InputBox

Func _Login_Vservices($a_Array, $i_Index, ByRef $o_Obj)
    Local $s_Url_Avtor = 'http://vservices.acesse.com/memberLogin.php?service=12', $o_Form, _
            $o_Inputs, $s_Url_After, $i_Error = 1

    If IsObj($o_Obj) Then
        _IEQuit($o_Obj)
        If @error Then Return SetError(1)
    EndIf
    $o_Obj = _IECreate()
    If @error Then Return SetError(1)
    For $i = 1 To 1
        _IENavigate($o_Obj, $s_Url_Avtor)
        If @error Then ExitLoop
        $o_Form = _IEFormGetCollection($o_Obj, 0)
        If @error Then ExitLoop
        $o_Inputs = _IETagNameGetCollection($o_Form, 'input')
        If @error Then ExitLoop
        For $o_Input In $o_Inputs
            If $o_Input.type == 'text' Then
                _IEFormElementSetValue($o_Input, $a_Array[$i_Index][0])
                If @error Then ExitLoop 2
            EndIf
            If $o_Input.type == 'password' Then
                _IEFormElementSetValue($o_Input, $a_Array[$i_Index][1])
                If @error Then ExitLoop 2
            EndIf
        Next
        _IEFormSubmit($o_Form, 0)
        If @error Then ExitLoop
        _IELoadWait($o_Obj)
        $s_Url_After = _IEPropertyGet($o_Obj, 'locationurl')
        If @error Then ExitLoop
        If $s_Url_After == $s_Url_Avtor Then ExitLoop
        $i_Error = 0
    Next
    Return SetError($i_Error)
EndFunc   ;==>_Login_Vservices
 

madmasles

Модератор
Глобальный модератор
Сообщения
7,790
Репутация
2,322
Gorenich [?]
У Вас какая система?

axlwor
Я попробовал удалять так:
Код:
Run('RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2')
Удаляет, но в процессах остается висеть.
 
Автор
G

Gorenich

ГорыНыЧ
Сообщения
38
Репутация
0
Система стоит ХР SP3
Скрипт 1 (удаляет куки и нормально пере заходит в офисы)
Код:
#include <IE.au3>


$varsetting = IniReadSectionNames("setting.ini")
$varzapros = IniReadSection("zapros.ini", "1")
$block = 5 ; блокировать файлы «cookie»
$unbock= 1 ; разблокировать файлы «cookie»
$site = "http://vservices.acesse.com/memberLogin.php?service=12" ; сайт
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\P3P\History\" & $site,"","REG_DWORD",$block)


for $w = 1 to $varsetting[0]
	$var1 = IniRead("setting.ini", $w, "1", "NotFound")
    $var2 = IniRead("setting.ini", $w, "2", "NotFound")
 $oIE = _IECreate("http://vservices.acesse.com/memberLogin.php?service=12")

 $text = 2
 _IEzap($oIE,0,1,$var1)
 _IEzap($oIE,0,2,$var2)
 sleep(100)
 _IEclick($oIE,0,3,"Login")
 sleep(10000)

_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse1&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse2&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse3&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse4&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse5&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse6&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse7&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse8&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse9&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse10&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse11&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse12&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse13&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse14&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse15&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse16&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse17&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse18&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse19&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse20&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse21&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse22&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse23&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse24&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse25&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse26&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse27&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse28&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse29&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse30&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse31&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse32&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse33&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse34&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse35&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse36&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse37&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse38&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse39&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse40&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse41&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse42&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse43&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse44&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse45&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse46&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse47&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse48&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse49&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse50&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse51&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse52&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse53&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse54&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse55&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse56&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse57&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse58&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse59&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse60&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse61&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse62&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse63&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse64&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse65&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse66&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse67&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse68&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse69&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse70&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse71&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse72&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse73&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse74&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse75&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse76&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse77&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse78&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse79&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse80&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse81&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse82&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse83&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse84&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse85&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse86&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse87&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse88&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse89&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse90&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse91&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse92&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse93&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse94&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse95&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse96&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse97&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse98&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse99&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse100&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse101&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse102&type=web")
_IENavigate ($oIE, "http://acesse.com/index.php?page=search/noresults&search=acesse103&type=web")
	_IEQuit($oIE)
	sleep(200)
	$StaleCookies = @UserProfileDir & "\Cookies"
FileDelete($StaleCookies & "\*.*")
	next


 func _IEzap($IESET,$form,$index,$text)
	 		$oForm = _IEFormGetCollection($IESET,$form )
				$oText = _IEFormElementGetCollection($oForm, $index)
				_IEFormElementSetValue($oText,$text )



	 EndFunc
	  func _IEclick($IESET,$form,$index,$name)



 	$oForm = _IEFormGetCollection($IESET, $form)



				Do
					$oSubmit = _IEFormElementGetCollection($oForm, $index)
				Until StringStripWS(_IEFormElementGetValue($oSubmit), $index) = $name
				_IEAction($oSubmit, "click")




	 EndFunc
Скрипт (не удаляет куки и не пере заходит в офисы)
Код:
#include <IE.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <File.au3>

Opt('MustDeclareVars', 1)
Opt('TrayMenuMode', 0)

Global $sTitle = 'Vservices', $aLogin, $iNumberStart, $oIE

If WinExists($sTitle & '{[/@$@\]}') Then Exit
AutoItWinSetTitle($sTitle & '{[/@$@\]}')

_Get_Array_Login($aLogin)
If @error Then
    MsgBox(16, 'Error', '_Get_Array_Login')
    Exit
EndIf
_InputBox($aLogin[0][0], $iNumberStart)
For $i = $iNumberStart To $aLogin[0][0]
    _Login_Vservices($aLogin, $i, $oIE)
    If @error Then ContinueLoop
    For $j = 1 To 100
        _IENavigate($oIE, 'http://acesse.com/index.php?page=search/noresults&search=gorenich' & $j & '&type=web')
	Next
	Sleep(1000)
	Run('RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2')
	_IEQuit($oIE)
Next
Func _Get_Array_Login(ByRef $a_Array)
    Local $s_FileIni = @ScriptDir & '\setting.ini', $a_SectionNames, $a_Section, $i_Count, $f_Yes

    If Not FileExists($s_FileIni) Then Return SetError(1)
    $a_SectionNames = IniReadSectionNames($s_FileIni)
    If @error Then Return SetError(1)
    If IsArray($a_Array) Then $a_Array = 0
    Dim $a_Array[$a_SectionNames[0] + 1][2]
    For $i = 1 To $a_SectionNames[0]
        $a_Section = IniReadSection($s_FileIni, $a_SectionNames[$i])
        If @error Then ContinueLoop
        If $a_Section[0][0] <> 2 Then ContinueLoop
        $f_Yes = True
        For $j = 1 To $a_Section[0][0]
            If Not $a_Section[$j][1] Then
                $f_Yes = False
                ExitLoop
            EndIf
        Next
        If $f_Yes Then
            $i_Count += 1
            For $j = 0 To 1
                $a_Array[$i_Count][$j] = $a_Section[$j + 1][1]
            Next
        EndIf
    Next
    If Not $i_Count Then Return SetError(1)
    ReDim $a_Array[$i_Count + 1][2]
    $a_Array[0][0] = $i_Count
EndFunc   ;==>_Get_Array_Login

Func _InputBox($i_Max, ByRef $i_Number)
    Local $h_Gui, $nInputBox, $nOk, $nCancel, $sInput
    $h_Gui = GUICreate($sTitle, 250, 120, -1, -1, $WS_OVERLAPPED, BitOR($WS_EX_TOOLWINDOW, $WS_EX_TOPMOST))
    GUICtrlCreateLabel('Введите номер, с которого начнем (max = ' & $i_Max & '):', 5, 10, 230, 18, $ES_CENTER)
    $nInputBox = GUICtrlCreateInput('1', 100, 30, 50, 20, BitOR($ES_NUMBER, $ES_CENTER))
    $nOk = GUICtrlCreateButton('OK', 40, 60, 65, 25)
    GUICtrlSetTip(-1, 'Выбрать введенный номер')
    GUICtrlSetCursor(-1, 0)
    $nCancel = GUICtrlCreateButton('Выход', 145, 60, 65, 25)
    GUICtrlSetTip(-1, 'Выход из программы')
    GUICtrlSetCursor(-1, 0)
    GUISetState()

    While 1
        $sInput = GUICtrlRead($nInputBox)
        If Number($sInput) > $i_Max Then
            GUICtrlSetData($nInputBox, $i_Max)
        EndIf
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE, $nCancel
                If MsgBox(36, $sTitle, 'Вы уверены, что хотите выйти из программы?', 0, $h_Gui) = 6 Then Exit
            Case $nOk
                $sInput = GUICtrlRead($nInputBox)
                If Number($sInput) Then
                    $i_Number = $sInput
                    GUIDelete($h_Gui)
                    Return
                EndIf
        EndSwitch
    WEnd
EndFunc   ;==>_InputBox

Func _Login_Vservices($a_Array, $i_Index, ByRef $o_Obj)
    Local $s_Url_Avtor = 'http://vservices.acesse.com/memberLogin.php?service=12', $o_Form, _
            $o_Inputs, $s_Url_After, $i_Error = 1

    If IsObj($o_Obj) Then
        _IEQuit($o_Obj)
        If @error Then Return SetError(1)
    EndIf
    $o_Obj = _IECreate()
    If @error Then Return SetError(1)
    For $i = 1 To 1
        _IENavigate($o_Obj, $s_Url_Avtor)
        If @error Then ExitLoop
        $o_Form = _IEFormGetCollection($o_Obj, 0)
        If @error Then ExitLoop
        $o_Inputs = _IETagNameGetCollection($o_Form, 'input')
        If @error Then ExitLoop
        For $o_Input In $o_Inputs
            If $o_Input.type == 'text' Then
                _IEFormElementSetValue($o_Input, $a_Array[$i_Index][0])
                If @error Then ExitLoop 2
            EndIf
            If $o_Input.type == 'password' Then
                _IEFormElementSetValue($o_Input, $a_Array[$i_Index][1])
                If @error Then ExitLoop 2
            EndIf
        Next
        _IEFormSubmit($o_Form, 0)
        If @error Then ExitLoop
        _IELoadWait($o_Obj)
        $s_Url_After = _IEPropertyGet($o_Obj, 'locationurl')
        If @error Then ExitLoop
        If $s_Url_After == $s_Url_Avtor Then ExitLoop
        $i_Error = 0
    Next
    Return SetError($i_Error)
EndFunc   ;==>_Login_Vservices
Как сделать чтобы в скрипте 2 чистились куки?

Офисы для проверки чистки кук
151334
151335
151336
151337
151338
на всех пароль Gorenich1988
 
Автор
G

Gorenich

ГорыНыЧ
Сообщения
38
Репутация
0
Зашел в настройки Explorer и нашел там такую запись в разделе Конфиденциальность-Узлы
и там стоит http://vservices.acesse.com/memberLogin.php?service=12 БЛОКИРОВАТЬ ВСЕГДА
Может из-за этого не удаляются куки этого сайта и как это исправить?
После переустановки на РАЗРЕШИТЬ и даже удаления этой строки,все равно она появляется и стоит статус БЛОКИРОВАТЬ ВСЕГДА.
Пробовал скачать Explorer и заново установить не помогло !
Восстановление Explorerа тоже не дало результата!
Пробовал на другом компе запускать этот же скрипт также куки не удаляются!

Может кто знает как это исправить,буду очень благодарен!
 

madmasles

Модератор
Глобальный модератор
Сообщения
7,790
Репутация
2,322
Gorenich,
У меня этот вариант работает, как часы, с файлом setting.ini (прикреплен).
Код:
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <IE.au3>
#include <File.au3>

Opt('MustDeclareVars', 1)
Opt('TrayMenuMode', 1)

Global $sTitle = 'Vservices', $aLogin, $iNumberStart, $oIE

If WinExists($sTitle & '{[/@$@\]}') Then Exit
AutoItWinSetTitle($sTitle & '{[/@$@\]}')

_Get_Array_Login($aLogin)
If @error Then
	MsgBox(16, 'Error', '_Get_Array_Login')
	Exit
EndIf

_InputBox($aLogin[0][0], $iNumberStart)

For $i = $iNumberStart To $aLogin[0][0]
	_Del_Cookie()
	_Login_Vservices($aLogin, $i, $oIE)
	If @error Then ContinueLoop
	For $j = 1 To 100
		_IENavigate($oIE, 'http://acesse.com/index.php?page=search/noresults&search=gorenich' & $j & '&type=web')
		If @error Then
			ConsoleWrite(@error & @LF)
		Else
			Local $oForm = _IEGetObjById($oIE, 'searchform')
			If Not @error Then
				Local $oSearch = _IEFormElementGetObjByName($oForm, 'search')
				If Not @error Then
					Local $sSearch = _IEFormElementGetValue($oSearch)
					If Not @error Then
						ConsoleWrite($sSearch & @LF)
					Else
						ConsoleWrite(@error & @LF)
					EndIf
				Else
					ConsoleWrite(@error & @LF)
				EndIf
			Else
				ConsoleWrite(@error & @LF)
			EndIf
		EndIf
	Next
Next
If IsObj($oIE) Then _IEQuit($oIE)
_Del_Cookie()
MsgBox(64, 'Info', 'Все')

Func _Get_Array_Login(ByRef $a_Array)
	Local $s_FileIni = @ScriptDir & '\setting.ini', $a_SectionNames, $a_Section, $i_Count, $f_Yes

	If Not FileExists($s_FileIni) Then Return SetError(1)
	$a_SectionNames = IniReadSectionNames($s_FileIni)
	If @error Then Return SetError(1)
	If IsArray($a_Array) Then $a_Array = 0
	Dim $a_Array[$a_SectionNames[0] + 1][2]
	For $i = 1 To $a_SectionNames[0]
		$a_Section = IniReadSection($s_FileIni, $a_SectionNames[$i])
		If @error Then ContinueLoop
		If $a_Section[0][0] <> 2 Then ContinueLoop
		$f_Yes = True
		For $j = 1 To $a_Section[0][0]
			If Not $a_Section[$j][1] Then
				$f_Yes = False
				ExitLoop
			EndIf
		Next
		If $f_Yes Then
			$i_Count += 1
			For $j = 0 To 1
				$a_Array[$i_Count][$j] = $a_Section[$j + 1][1]
			Next
		EndIf
	Next
	If Not $i_Count Then Return SetError(1)
	ReDim $a_Array[$i_Count + 1][2]
	$a_Array[0][0] = $i_Count
EndFunc   ;==>_Get_Array_Login

Func _InputBox($i_Max, ByRef $i_Number)
	Local $h_Gui, $nInputBox, $nOk, $nCancel, $sInput
	$h_Gui = GUICreate($sTitle, 250, 120, -1, -1, $WS_OVERLAPPED, BitOR($WS_EX_TOOLWINDOW, $WS_EX_TOPMOST))
	GUICtrlCreateLabel('Введите номер, с которого начнем (max = ' & $i_Max & '):', 5, 10, 230, 18, $ES_CENTER)
	$nInputBox = GUICtrlCreateInput('1', 100, 30, 50, 20, BitOR($ES_NUMBER, $ES_CENTER))
	$nOk = GUICtrlCreateButton('OK', 40, 60, 65, 25)
	GUICtrlSetTip(-1, 'Выбрать введенный номер')
	GUICtrlSetCursor(-1, 0)
	$nCancel = GUICtrlCreateButton('Выход', 145, 60, 65, 25)
	GUICtrlSetTip(-1, 'Выход из программы')
	GUICtrlSetCursor(-1, 0)
	GUISetState()

	While 1
		$sInput = GUICtrlRead($nInputBox)
		If Number($sInput) > $i_Max Then
			GUICtrlSetData($nInputBox, $i_Max)
		EndIf
		Switch GUIGetMsg()
			Case $GUI_EVENT_CLOSE, $nCancel
				If MsgBox(36, $sTitle, 'Вы уверены, что хотите выйти из программы?', 0, $h_Gui) = 6 Then Exit
			Case $nOk
				$sInput = GUICtrlRead($nInputBox)
				If Number($sInput) Then
					$i_Number = $sInput
					GUIDelete($h_Gui)
					Return
				EndIf
		EndSwitch
	WEnd
EndFunc   ;==>_InputBox

Func _Login_Vservices($a_Array, $i_Index, ByRef $o_Obj)
	Local $s_Url_Avtor = 'http://vservices.acesse.com/memberLogin.php?service=12', $o_Form, _
			$o_Inputs, $s_Url_After, $i_Error = 1

	If IsObj($o_Obj) Then
		_IEQuit($o_Obj)
		If @error Then Return SetError(1)
	EndIf
	$o_Obj = _IECreate()
	If @error Then Return SetError(1)
	For $i = 1 To 1
		_IENavigate($o_Obj, $s_Url_Avtor)
		If @error Then ExitLoop
		$o_Form = _IEFormGetCollection($o_Obj, 0)
		If @error Then ExitLoop
		$o_Inputs = _IETagNameGetCollection($o_Form, 'input')
		If @error Then ExitLoop
		For $o_Input In $o_Inputs
			If $o_Input.type == 'text' Then
				_IEFormElementSetValue($o_Input, $a_Array[$i_Index][0])
				If @error Then ExitLoop 2
			EndIf
			If $o_Input.type == 'password' Then
				_IEFormElementSetValue($o_Input, $a_Array[$i_Index][1])
				If @error Then ExitLoop 2
			EndIf
		Next
		_IEFormSubmit($o_Form, 0)
		If @error Then ExitLoop
		_IELoadWait($o_Obj)
		$s_Url_After = _IEPropertyGet($o_Obj, 'locationurl')
		If @error Then ExitLoop
		If $s_Url_After == $s_Url_Avtor Then ExitLoop
		$i_Error = 0
	Next
	Return SetError($i_Error)
EndFunc   ;==>_Login_Vservices

Func _Del_Cookie()
	Local $a_Files_Cookie, $s_Path = @UserProfileDir & '\Cookies'

	$a_Files_Cookie = _FileListToArray($s_Path, '*.txt', 1)
	If @error Then Return
	For $i = 1 To $a_Files_Cookie[0]
		If Not FileDelete($s_Path & '\' & $a_Files_Cookie[$i]) Then
			FileSetAttrib($s_Path & '\' & $a_Files_Cookie[$i], '-RS')
			FileDelete($s_Path & '\' & $a_Files_Cookie[$i])
		EndIf
	Next
EndFunc   ;==>_Del_Cookie


Gorenich [?]
Посмотрите в реестре HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\P3P\History\, у Вас там нет чего-нибудь, связанного с этим сайтом.
 
Автор
G

Gorenich

ГорыНыЧ
Сообщения
38
Репутация
0
:wall_brake:Сейчас снесу винду и проверю,на чистой!
Как проверю отпишусь!
 
Автор
G

Gorenich

ГорыНыЧ
Сообщения
38
Репутация
0
Огромное Вам спасибо!
Он правда работает как часы, даже немного лучше!
Пере установил винду и все заработало!
:thumbs_up: :thumbs_up: :thumbs_up:
 
Верх