- Retrieving class property/constant names from its value - Python
- import win32api, pythoncom
- from win32com.taskscheduler import taskscheduler
- ts = pythoncom.CoCreateInstance(taskscheduler.CLSID_CTaskScheduler,None,pythoncom.CLSCTX_INPROC_SERVER,taskscheduler.IID_ITaskScheduler)
- task = ts.Activate('TestJob')
- task.GetStatus()
- [i[0] for i in taskscheduler.__dict__.items() if i[1] == 267008]