示例#1
0
def mouse_alternates(mode, nexus, monitor=1):
    if nexus.dep.PIL:
        if mode == "legion" and not utilities.window_exists(None, "legiongrid"):
            r = monitors[int(monitor) - 1].rectangle
            bbox = [
                int(r.x),
                int(r.y),
                int(r.x) + int(r.dx) - 1,
                int(r.y) + int(r.dy) - 1
            ]
            ls = LegionScanner()
            ls.scan(bbox)
            tscan = ls.get_update()
            Popen([
                settings.SETTINGS["paths"]["PYTHONW"],
                settings.SETTINGS["paths"]["LEGION_PATH"], "-t", tscan[0], "-m",
                str(monitor)
            ])  # , "-d", "500_500_500_500"
        elif mode == "rainbow" and not utilities.window_exists(None, "rainbowgrid"):
            Popen([
                settings.SETTINGS["paths"]["PYTHONW"],
                settings.SETTINGS["paths"]["RAINBOW_PATH"], "-g", "r", "-m",
                str(monitor)
            ])
        elif mode == "douglas" and not utilities.window_exists(None, "douglasgrid"):
            Popen([
                settings.SETTINGS["paths"]["PYTHONW"],
                settings.SETTINGS["paths"]["DOUGLAS_PATH"], "-g", "d", "-m",
                str(monitor)
            ])
    else:
        utilities.availability_message(mode.title(), "PIL")
示例#2
0
def mouse_alternates(mode):
    if control.nexus().dep.PIL:
        try:
            if mode == "legion":
                if utilities.window_exists(None, "legiongrid"):
                    pass
                else:
                    ls = LegionScanner()
                    ls.scan()  #[500, 500, 1000, 1000]
                    tscan = ls.get_update()
                    Popen([
                        "pythonw", settings.SETTINGS["paths"]["LEGION_PATH"],
                        "-t", tscan[0]
                    ])  #, "-d", "500_500_500_500"
            elif mode == "rainbow":
                Popen([
                    "pythonw", settings.SETTINGS["paths"]["RAINBOW_PATH"],
                    "-m", "r"
                ])
            elif mode == "douglas":
                Popen([
                    "pythonw", settings.SETTINGS["paths"]["DOUGLAS_PATH"],
                    "-m", "d"
                ])
        except Exception:
            utilities.simple_log(True)
    else:
        utilities.availability_message(mode.title(), "PIL")
示例#3
0
def mouse_alternates(mode, nexus, monitor=1):
    if nexus.dep.PIL:
        if mode == "legion" and not utilities.window_exists(
                None, "legiongrid"):
            r = monitors[int(monitor) - 1].rectangle
            bbox = [
                int(r.x),
                int(r.y),
                int(r.x) + int(r.dx) - 1,
                int(r.y) + int(r.dy) - 1
            ]
            ls = LegionScanner()
            ls.scan(bbox)
            tscan = ls.get_update()
            Popen([
                "pythonw", settings.SETTINGS["paths"]["LEGION_PATH"], "-t",
                tscan[0], "-m",
                str(monitor)
            ])  # , "-d", "500_500_500_500"
        elif mode == "rainbow" and not utilities.window_exists(
                None, "rainbowgrid"):
            Popen([
                "pythonw", settings.SETTINGS["paths"]["RAINBOW_PATH"], "-g",
                "r", "-m",
                str(monitor)
            ])
        elif mode == "douglas" and not utilities.window_exists(
                None, "douglasgrid"):
            Popen([
                "pythonw", settings.SETTINGS["paths"]["DOUGLAS_PATH"], "-g",
                "d", "-m",
                str(monitor)
            ])
    else:
        utilities.availability_message(mode.title(), "PIL")
示例#4
0
def mouse_alternates(mode):
    if control.nexus().dep.PIL:
        try:
            if mode == "legion":
                if utilities.window_exists(None, "legiongrid"):
                    pass
                else:
                    ls = LegionScanner()
                    ls.scan()#[500, 500, 1000, 1000]
                    tscan = ls.get_update()
                    Popen(["pythonw", settings.SETTINGS["paths"]["LEGION_PATH"], "-t", tscan[0]])#, "-d", "500_500_500_500"
            elif mode == "rainbow":
                Popen(["pythonw", settings.SETTINGS["paths"]["RAINBOW_PATH"], "-m", "r"])
            elif mode == "douglas":
                Popen(["pythonw", settings.SETTINGS["paths"]["DOUGLAS_PATH"], "-m", "d"])
        except Exception:
            utilities.simple_log(True)
    else:
        utilities.availability_message(mode.title(), "PIL")