# Importing 'engine' module import engine # Adding global variables: ATIH_PATH = engine.macro.ProgramFiles_x86 + r"\Acronis\TrueImageHome\TrueImage.exe" ATIH_TITLE = "[REGEXPTITLE:Acronis.True.Image]" ATIH_BACKUP_WIZARD_TITLE = "[CLASS:ArchiveWizard]" # Create new 'engine' object myTC = engine(logfile = r".\results.log") # Creating new 'application' and 'window' objects: atih = myTC.application(ATIH_PATH) atih_main_window = atih.window(title = ATIH_TITLE) atih_backup_wizard_window = atih.window(title = ATIH_BACKUP_WIZARD_TITLE) # Run created application and wait for main window to appear atih_pid = atih.run(wait = False, show = engine.MAXIMIZE) atih_main_window.wait(60) # Run Backup wizard window and create its screen shot, then close it atih_main_window.click(x = 445, y = 322) atih_main_window.click(image = r".\extra\mydiskdrives.png", click = 1, button = "left", timeout = 60) atih_backup_wizard_window.wait(60) atih_backup_wizard_window.capture(filename = ".\screenshots\backup_wiz.png") atih_backup_wizard_window.close() atih_main_window.close() # Exit myTC.exit(0)