C2H5OH
AutoIT Гуру
- Сообщения
- 1,473
- Репутация
- 333
madmasles,
Раз на раз не приходится. У меня на WinXPx32 серевнуются IsHWnd и WinExists. И показывает что побеждает WinExists.
(правда с изменениями в скрипте)
Раз на раз не приходится. У меня на WinXPx32 серевнуются IsHWnd и WinExists. И показывает что побеждает WinExists.
(правда с изменениями в скрипте)
Код:
For $i = 1 To $iCount
Sleep(1000)
$iTimer = TimerInit()
For $j = 1 To 100
$iRes = ProcessExists($iPid)
Next
$aResult[0][$i] = Round(TimerDiff($iTimer), 3)
ConsoleWrite('ProcessExists: ' & $aResult[0][$i] & @TAB & $iRes & @LF)
Sleep(1000)
$iTimer = TimerInit()
For $j = 1 To 100
$hWin = WinGetHandle('[Title:' & $sTitle & ';Class:AutoIt v3]')
Next
$aResult[1][$i] = Round(TimerDiff($iTimer), 3)
ConsoleWrite('WinGetHandle: ' & $aResult[1][$i] & @TAB & $hWin & @LF)
Sleep(1000)
$iTimer = TimerInit()
For $j = 1 To 100
$aRes = DllCall('user32.dll', 'hwnd', 'FindWindowW', 'wstr', 'AutoIt v3', 'wstr', $sTitle)
Next
$aResult[2][$i] = Round(TimerDiff($iTimer), 3)
ConsoleWrite('FindWindowW: ' & $aResult[2][$i] & @TAB & $aRes[0] & @LF)
Sleep(1000)
$iTimer = TimerInit()
For $j = 1 To 100
$iRes = WinExists($hWnd)
Next
$aResult[3][$i] = Round(TimerDiff($iTimer), 3)
ConsoleWrite('WinExists: ' & $aResult[3][$i] & @TAB & $iRes & @LF)
Sleep(1000)
$iTimer = TimerInit()
For $j = 1 To 100
$aRes = DllCall('user32.dll', 'int', 'IsWindow', 'hwnd', $hWnd)
Next
$aResult[4][$i] = Round(TimerDiff($iTimer), 3)
ConsoleWrite('IsWindow: ' & $aResult[4][$i] & @TAB & $aRes[0] & @LF)
Sleep(1000)
$iTimer = TimerInit()
For $j = 1 To 100
$iRes = IsHWnd($hWnd)
Next
$aResult[5][$i] = Round(TimerDiff($iTimer), 3)
ConsoleWrite('IsHWnd: ' & $aResult[5][$i] & @TAB & $iRes & @LF)
Sleep(1000)
$iTimer = TimerInit()
For $j = 1 To 100
$aRes = DllCall('kernel32.dll', 'int', 'GetExitCodeProcess', 'ptr', $hProc, 'dword*', 0)
Next
$aResult[6][$i] = Round(TimerDiff($iTimer), 3)
ConsoleWrite('GetExitCodeProcess: ' & $aResult[6][$i] & @TAB & $aRes[2] & @LF)
ConsoleWrite('---' & @LF)
Next