Компьютерный форум OSzone.net  

Компьютерный форум OSzone.net (http://forum.oszone.net/index.php)
-   AutoIt (http://forum.oszone.net/forumdisplay.php?f=103)
-   -   [решено] TeamViewer 4.1.6911 (http://forum.oszone.net/showthread.php?t=156077)

zver5 07-11-2009 11:49 1263817

TeamViewer 4.1.6911
 
Сссылка на программу
http://www.teamviewer.com/download/TeamViewer_Setup.exe
имеем следующее:
последнее окно с finish не закрывается что можно тут сделать и как?

Код:

If WinExists(@ScriptName) Then Exit
AutoItWinSetTitle(@ScriptName)
AutoItSetOption("TrayIconDebug",1)
BlockInput(1)
Run("TeamViewer_Setup.exe")
WinWaitActive("TeamViewer 4 Setup","Welcome to TeamViewer")
ControlClick("TeamViewer 4 Setup","Welcome to TeamViewer","Button4")
Sleep(500)
ControlClick("TeamViewer 4 Setup","Welcome to TeamViewer","Button2")
WinWaitActive("TeamViewer 4 Setup","Environment")
ControlClick("TeamViewer 4 Setup","Environment","Button4")
Sleep(500)
ControlClick("TeamViewer 4 Setup","Environment","Button2")
WinWaitActive("TeamViewer 4 Setup","License Agreement")
ControlClick("TeamViewer 4 Setup","License Agreement","Button4")
Sleep(500)
ControlClick("TeamViewer 4 Setup","License Agreement","Button5")
Sleep(500)
ControlClick("TeamViewer 4 Setup","License Agreement","Button2")
WinWaitActive("TeamViewer 4 Setup","Choose installation type")
ControlClick("TeamViewer 4 Setup","Choose installation type","Button5")
Sleep(500)
ControlClick("TeamViewer 4 Setup","Choose installation type","Button2")
WinWaitActive("TeamViewer 4 Setup","Access Control")
ControlClick("TeamViewer 4 Setup","Access Control","Button4")
Sleep(500)
ControlClick("TeamViewer 4 Setup","Access Control","Button2")
WinWaitActive("TeamViewer 4 Setup","Install VPN adapter")
ControlClick("TeamViewer 4 Setup","Install VPN adapter","Button4")
Sleep(500)
ControlClick("TeamViewer 4 Setup","Install VPN adapter","Button2")
WinWaitActive("TeamViewer 4 Setup","Completing the TeamViewer 4 Setup Wizard")
ControlClick("TeamViewer 4 Setup","Completing the TeamViewer 4 Setup Wizard","Button2")
BlockInput(0)
ExitIf


beve 07-11-2009 13:16 1263858

Цитата:

Цитата zver5
последнее окно с finish не закрывается что можно тут сделать и как? »

3 раза пробовал запускать твой скрипт у себя (и один раз запускал установщик по шагам скрипта, но без скрипта), и ошибка в том, что скрипт ждет появления окна: "Install VPN adapter", но это окно я так ни разу и не увидел. Вот так у меня работает:
читать дальше »
Код:

;If WinExists(@ScriptName) Then Exit
;AutoItWinSetTitle(@ScriptName)
AutoItSetOption
("TrayIconDebug",1)
BlockInput(1)
Run("TeamViewer_Setup.exe")
WinWait("TeamViewer 4 Setup","Welcome to TeamViewer")
ControlClick("TeamViewer 4 Setup","Welcome to TeamViewer","Button4")
Sleep(500)
ControlClick("TeamViewer 4 Setup","Welcome to TeamViewer","Button2")
WinWait("TeamViewer 4 Setup","Environment")
ControlClick("TeamViewer 4 Setup","Environment","Button4")
Sleep(500)
ControlClick("TeamViewer 4 Setup","Environment","Button2")
WinWait("TeamViewer 4 Setup","License Agreement")
ControlClick("TeamViewer 4 Setup","License Agreement","Button4")
Sleep(500)
ControlClick("TeamViewer 4 Setup","License Agreement","Button5")
Sleep(500)
ControlClick("TeamViewer 4 Setup","License Agreement","Button2")
WinWait("TeamViewer 4 Setup","Choose installation type")
ControlClick("TeamViewer 4 Setup","Choose installation type","Button5")
Sleep(500)
ControlClick("TeamViewer 4 Setup","Choose installation type","Button2")
WinWait("TeamViewer 4 Setup","Access Control")
ControlClick("TeamViewer 4 Setup","Access Control","Button4")
Sleep(500)
ControlClick("TeamViewer 4 Setup","Access Control","Button2")
WinWait("TeamViewer 4 Setup","Completing the TeamViewer 4 Setup Wizard")
ControlClick("TeamViewer 4 Setup","Completing the TeamViewer 4 Setup Wizard","Button2")
BlockInput(0)
Exit


Советую тебе в таких случаях, на этапе отладки, после WinWait ставить Msgbox(0,'','',1), и если таких окон будет много, то и пронумеровать msgbox-ы (Msgbox(0,"1","",1) и т.д. Так ты увидиш что скрипт, в твоем случае, ждет несуществующего окна...или, если это окно у тебя появляется, то вычислить другую причину...


Время: 04:29.

Время: 04:29.
© OSzone.net 2001-