Example of Getting Sendkeys and SendkeysChild Working
Keywords: Sendkeys SendkeysChild WinExistChild
Attached below is a snippet of code from installing WinZip, this is a good example of
what to write. You might also want to look up the WinWaitExist and WinWaitChild functions.
: CODE STARTS HERE
;Installation of WinZip
Run("g:\pkware\winzip.exe","")
While !WinExistChild("WinZip Self","&Unzip")
TimeDelay(1)
EndWhile
SendKeysChild("WinZip Self","&Unzip","!u")
While !WinExistChild("WinZip Self","OK")
TimeDelay(1)
EndWhile
SendKeysChild("WinZip Self","OK","{SPACE}")
While !WinExistChild("WinZip Setup","Setup will")
TimeDelay(1)
EndWhile
SendKeysChild("WinZip Setup","Setup will","{ENTER}")
While !WinExistChild("WinZip Setup","Thank you")
TimeDelay(1)
EndWhile
SendKeysChild("WinZip Setup","Thank you","!n")
While !WinExistChild("License Agreement","&View License")
TimeDelay(1)
EndWhile
SendKeysChild("License Agreement","&View License","!y")
While !WinExistChild("WinZip Setup","&WinZip Classic")
TimeDelay(1)
EndWhile
SendKeysChild("WinZip Setup","&WinZip Classic","!c!n")
While !WinExistChild("WinZip Setup","&Express setup")
TimeDelay(1)
EndWhile
SendKeysChild("WinZip Setup","&Express setup","!e!n")
While !WinExistChild("WinZip Setup","Installation is complete")
TimeDelay(1)
EndWhile
SendKeysChild("WinZip Setup","Installation is complete","{ENTER}")
While !WinExistChild("WinZip","extract")
TimeDelay(1)
EndWhile
if WinExist("WinZip") == @TRUE then WinClose("WinZip")
While WinExistChild("WinZip","extract")
TimeDelay(1)
EndWhile
if WinExist("WinZip") == @TRUE then WinClose("WinZip")
RunWait("deltree.exe","/y c:\winzip")
: CODE ENDS HERE
Article ID: W13841
Filename: Sendkeys and Winzip Example.txt