from elan import *

Configurator.Start()
Configurator.video.Click()
Configurator.Wait()
Configurator.media.Click()
Configurator.Wait()
Configurator.videodisplays.Click()
Configurator.sources.RightClickTypeThenPress('aaaaaaa','enter')
ImportIr.Wait()
sleep(3)
num = ImportIr.ComboBox.GetAmount(0)
print str(num)
ImportIr.Close()



for i in range(num):
    Configurator.media.Wait()
    Configurator.media.Click()
    Configurator.sources.Wait()
    sleep(1)
    Configurator.sources.RightClickTypeThenPress('aaaaaaa','enter')
    ImportIr.manufacturer.Wait()
    #ImportIr.EditBox.SetText(0,str(i))
    ImportIr.ComboBox.Select(0,i)
    
    ImportIr.ComboBox.Select(1,0)
    ImportIr.ComboBox.Select(2,0)
    ImportIr.PushButton.Click('OK')
    ImportIr.cancel.WaitVanish(300)
    Configurator.irrigation.Wait()
    Configurator.irrigation.Click()