def focus_was_success(title, executable): w = Window.get_foreground() success = True if title != None: success = title in w.title if success and executable != None: success = executable in w.executable return success
def focus_was_success(title, executable): w=Window.get_foreground() success=True if title!=None: success=title in w.title if success and executable!=None: success=executable in w.executable return success
def get_active_window_path(): #return natlink.getCurrentModule()[0] return Window.get_foreground().executable
def dredge(id, text): print Window.get_foreground().executable print [x.executable.split("\\")[-1][:-4] for x in Window.get_all_windows()]