#include <IE.au3>
#include <Array.au3>
#include <File.au3>
#include <UIAutomate.au3>
#include <WinAPIProc.au3>
#include <DDEML.au3>
#include <DDEMLClient.au3>
#include <WinAPI.au3>
#include <MouseOnEvent.au3>
HotKeySet("{Tab}", "TPause")
HotKeySet("{esc}", "vyx")
Global $Paused, $tUrl, $sUrl, $url, $hWnd1, $hWnd, $rURL, $iPID1, $hCtrl1, $hCtrl2, $hCtrl3
Global $vedushiy
Global $vedom1
Global $vedom2
Global $oIE1, $oIE2, $oIE3
; messir23p6054o
; messir1frs0bn92
; messir2t2ta4adj
$iPID1 = Run("C:\Program Files\Internet Explorer\iexplore.exe -noframemerging -private") ; IE10/11 -noframemerging -private
ProcessWait($iPID1)
$hWnd1 = _WinAPI_EnumProcessWindows($iPID1)
WinWaitActive($hWnd1[1][0])
$oIE1 = _IEAttach($hWnd1[1][0], "hwnd")
$hCtrl1 = WinGetHandle("[class:IEFrame]", "")
$iPID2 = Run("C:\Program Files\Internet Explorer\iexplore.exe -noframemerging -private") ; IE10/11 -noframemerging -private
ProcessWait($iPID2)
$hWnd2 = _WinAPI_EnumProcessWindows($iPID2)
WinWaitActive($hWnd2[1][0])
$oIE2 = _IEAttach($hWnd2[1][0], "hwnd")
$iPID3 = Run("C:\Program Files\Internet Explorer\iexplore.exe -noframemerging -private") ; IE10/11 -noframemerging -private
ProcessWait($iPID3)
$hWnd3 = _WinAPI_EnumProcessWindows($iPID3)
WinWaitActive($hWnd3[1][0])
$oIE3 = _IEAttach($hWnd3[1][0], "hwnd")
_IENavigate($oIE1, 'http://amuletdrakona.ru')
_IENavigate($oIE2, 'http://amuletdrakona.ru')
_IENavigate($oIE3, 'http://amuletdrakona.ru')
$vedushiy = InputBox("Вопрос", "Ведущий", "", "", -1, -1, 0, 0)
$vedom1 = InputBox("Вопрос", "Ведомый 1", "", "", -1, -1, 0, 0)
$vedom2 = InputBox("Вопрос", "Ведомый 2", "", "", -1, -1, 0, 0)
TPause()
osnova()
Func osnova()
While 1
$oParent = _UIA_GetElementFromHandle($hCtrl1)
$oElement = _UIA_GetControlTypeElement($oParent, "UIA_EditControlTypeId", "Адреса и поиск с помощью Яндекс", 'name', True)
$url = _UIA_ElementGetPropertyValue($oElement, "ValueValue")
If $url <> $tUrl Then
$rURL1 = StringRegExpReplace($url, $vedushiy, $vedom1)
$rURL2 = StringRegExpReplace($url, $vedushiy, $vedom2)
ConsoleWrite($rURL1 & @CRLF)
WinWaitActive($hWnd2[1][0])
$oIE2 = _IEAttach($hWnd2[1][0], "hwnd")
_IENavigate($oIE2, $rURL1, 0)
If @error Then ConsoleWrite(@error & @CRLF)
WinWaitActive($hWnd3[1][0])
$oIE3 = _IEAttach($hWnd3[1][0], "hwnd")
_IENavigate($oIE3, $rURL2, 0)
$tUrl = $url
EndIf
Sleep(20)
WEnd
EndFunc ;==>osnova
Func TPause()
$Paused = Not $Paused
While $Paused
Sleep(100)
ToolTip('Script is "Paused"', 0, 0)
WEnd
ToolTip("")
EndFunc ;==>TPause
Func vyx()
ToolTip("Good Buy", 0, 0)
Sleep(1000)
Exit
EndFunc ;==>vyx