Asus Aura Sync Python Script Not Running Correctly As Windows Scheduled Task

478 views Asked by At

I've made a Python script to turn on and off my Asus Aura Sync RGB components and everything works fine in an interactive scripting terminal. But when I try to run it as a Windows scheduled task the lights turn off and once the task ends the lights turn back on.

This is the code I'm using.

import win32com.client
auraSdk = win32com.client.Dispatch("aura.sdk.1")
auraSdk.SwitchMode()
devices = auraSdk.Enumerate(0)
for dev in devices:
            for i in range(dev.Lights.Count):
                dev.Lights(i).color = 0x00000000
                dev.Apply()

I'm not sure if it's a Windows thing or a Python thing or an AuraSDK (for reference: https://www.asus.com/microsite/aurareadydevportal/index.html) thing or a combination of all three.

Anything familiar with something like this that might have some advice?

Thanks.

1

There are 1 answers

0
Ringo On
  1. Turn on the RGB by "Armoury-Crate"

  2. Change below:

for dev in devices:
            for i in range(dev.Lights.Count):
                dev.Lights(i).color = 0x00000000
            dev.Apply()   #<--- Change to this level